Ruby 3.2.0dev (2022-06-11 revision 0e2c01bd094617f5c82759bdab03bb786ce89d56)
rb_mjit_min_header-2.8.0.h
1#ifdef __GNUC__
2# pragma GCC system_header
3#endif
4
5
6
7
8
9
10
11
12
13#define ALWAYS_INLINE(x) __attribute__ ((__always_inline__)) x
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49typedef __builtin_va_list va_list;
50
51
52
53
54
55
56
57
58
59
60typedef __builtin_va_list __gnuc_va_list;
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306typedef long unsigned int size_t;
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342typedef unsigned char __u_char;
343typedef unsigned short int __u_short;
344typedef unsigned int __u_int;
345typedef unsigned long int __u_long;
346
347
348typedef signed char __int8_t;
349typedef unsigned char __uint8_t;
350typedef signed short int __int16_t;
351typedef unsigned short int __uint16_t;
352typedef signed int __int32_t;
353typedef unsigned int __uint32_t;
354
355typedef signed long int __int64_t;
356typedef unsigned long int __uint64_t;
357
358
359
360
361
362
363typedef __int8_t __int_least8_t;
364typedef __uint8_t __uint_least8_t;
365typedef __int16_t __int_least16_t;
366typedef __uint16_t __uint_least16_t;
367typedef __int32_t __int_least32_t;
368typedef __uint32_t __uint_least32_t;
369typedef __int64_t __int_least64_t;
370typedef __uint64_t __uint_least64_t;
371
372
373
374typedef long int __quad_t;
375typedef unsigned long int __u_quad_t;
376
377
378
379
380
381
382
383typedef long int __intmax_t;
384typedef unsigned long int __uintmax_t;
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422typedef unsigned long int __dev_t;
423typedef unsigned int __uid_t;
424typedef unsigned int __gid_t;
425typedef unsigned long int __ino_t;
426typedef unsigned long int __ino64_t;
427typedef unsigned int __mode_t;
428typedef unsigned long int __nlink_t;
429typedef long int __off_t;
430typedef long int __off64_t;
431typedef int __pid_t;
432typedef struct { int __val[2]; } __fsid_t;
433typedef long int __clock_t;
434typedef unsigned long int __rlim_t;
435typedef unsigned long int __rlim64_t;
436typedef unsigned int __id_t;
437typedef long int __time_t;
438typedef unsigned int __useconds_t;
439typedef long int __suseconds_t;
440
441typedef int __daddr_t;
442typedef int __key_t;
443
444
445typedef int __clockid_t;
446
447
448typedef void * __timer_t;
449
450
451typedef long int __blksize_t;
452
453
454
455
456typedef long int __blkcnt_t;
457typedef long int __blkcnt64_t;
458
459
460typedef unsigned long int __fsblkcnt_t;
461typedef unsigned long int __fsblkcnt64_t;
462
463
464typedef unsigned long int __fsfilcnt_t;
465typedef unsigned long int __fsfilcnt64_t;
466
467
468typedef long int __fsword_t;
469
470typedef long int __ssize_t;
471
472
473typedef long int __syscall_slong_t;
474
475typedef unsigned long int __syscall_ulong_t;
476
477
478
479typedef __off64_t __loff_t;
480typedef char *__caddr_t;
481
482
483typedef long int __intptr_t;
484
485
486typedef unsigned int __socklen_t;
487
488
489
490
491typedef int __sig_atomic_t;
492
493
494
495
496
497typedef struct
498{
499 int __count;
500 union
501 {
502 unsigned int __wch;
503 char __wchb[4];
504 } __value;
506
507
508
509
510typedef struct _G_fpos_t
511{
512 __off_t __pos;
513 __mbstate_t __state;
514} __fpos_t;
515
516
517
518
519
520
521
522
523typedef struct _G_fpos64_t
524{
525 __off64_t __pos;
526 __mbstate_t __state;
527} __fpos64_t;
528
529
530struct _IO_FILE;
531typedef struct _IO_FILE __FILE;
532
533
534struct _IO_FILE;
535
536
537typedef struct _IO_FILE FILE;
538struct _IO_FILE;
539struct _IO_marker;
540struct _IO_codecvt;
541struct _IO_wide_data;
542
543
544
545
546typedef void _IO_lock_t;
547
548
549
550
551
552struct _IO_FILE
553{
554 int _flags;
555
556
557 char *_IO_read_ptr;
558 char *_IO_read_end;
559 char *_IO_read_base;
560 char *_IO_write_base;
561 char *_IO_write_ptr;
562 char *_IO_write_end;
563 char *_IO_buf_base;
564 char *_IO_buf_end;
565
566
567 char *_IO_save_base;
568 char *_IO_backup_base;
569 char *_IO_save_end;
570
571 struct _IO_marker *_markers;
572
573 struct _IO_FILE *_chain;
574
575 int _fileno;
576 int _flags2;
577 __off_t _old_offset;
578
579
580 unsigned short _cur_column;
581 signed char _vtable_offset;
582 char _shortbuf[1];
583
584 _IO_lock_t *_lock;
585
586
587
588
589
590
591
592 __off64_t _offset;
593
594 struct _IO_codecvt *_codecvt;
595 struct _IO_wide_data *_wide_data;
596 struct _IO_FILE *_freeres_list;
597 void *_freeres_buf;
598 size_t __pad5;
599 int _mode;
600
601 char _unused2[15 * sizeof (int) - 4 * sizeof (void *) - sizeof (size_t)];
602};
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623typedef __ssize_t cookie_read_function_t (void *__cookie, char *__buf,
624 size_t __nbytes);
625
626
627
628
629
630
631
632typedef __ssize_t cookie_write_function_t (void *__cookie, const char *__buf,
633 size_t __nbytes);
634
635
636
637
638
639
640
641typedef int cookie_seek_function_t (void *__cookie, __off64_t *__pos, int __w);
642
643
644typedef int cookie_close_function_t (void *__cookie);
645
646
647
648
649
650
651typedef struct _IO_cookie_io_functions_t
652{
653 cookie_read_function_t *read;
654 cookie_write_function_t *write;
655 cookie_seek_function_t *seek;
656 cookie_close_function_t *close;
658
659
660
661
662
663typedef __gnuc_va_list va_list;
664typedef __off_t off_t;
665
666
667
668
669
670typedef __off64_t off64_t;
671
672
673
674
675
676typedef __ssize_t ssize_t;
677
678
679
680
681
682typedef __fpos_t fpos_t;
683
684
685
686
687typedef __fpos64_t fpos64_t;
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722extern FILE *stdin;
723extern FILE *stdout;
724extern FILE *stderr;
725
726
727
728extern int remove (const char *__filename) __attribute__ ((__nothrow__ ));
729
730extern int rename (const char *__old, const char *__new) __attribute__ ((__nothrow__ ));
731
732
733
734extern int renameat (int __oldfd, const char *__old, int __newfd,
735 const char *__new) __attribute__ ((__nothrow__ ));
736
737
738
739
740
741
742
743extern int renameat2 (int __oldfd, const char *__old, int __newfd,
744 const char *__new, unsigned int __flags) __attribute__ ((__nothrow__ ));
745
746
747
748
749
750
751
752extern FILE *tmpfile (void) __attribute__ ((__warn_unused_result__));
753extern FILE *tmpfile64 (void) __attribute__ ((__warn_unused_result__));
754
755
756
757extern char *tmpnam (char *__s) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
758
759
760
761
762extern char *tmpnam_r (char *__s) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
763extern char *tempnam (const char *__dir, const char *__pfx)
764 __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
765
766
767
768
769
770
771
772extern int fclose (FILE *__stream);
773
774
775
776
777extern int fflush (FILE *__stream);
778extern int fflush_unlocked (FILE *__stream);
779extern int fcloseall (void);
780extern FILE *fopen (const char *__restrict __filename,
781 const char *__restrict __modes) __attribute__ ((__warn_unused_result__));
782
783
784
785
786extern FILE *freopen (const char *__restrict __filename,
787 const char *__restrict __modes,
788 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
789extern FILE *fopen64 (const char *__restrict __filename,
790 const char *__restrict __modes) __attribute__ ((__warn_unused_result__));
791extern FILE *freopen64 (const char *__restrict __filename,
792 const char *__restrict __modes,
793 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
794
795
796
797
798extern FILE *fdopen (int __fd, const char *__modes) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
799
800
801
802
803
804extern FILE *fopencookie (void *__restrict __magic_cookie,
805 const char *__restrict __modes,
806 cookie_io_functions_t __io_funcs) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
807
808
809
810
811extern FILE *fmemopen (void *__s, size_t __len, const char *__modes)
812 __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
813
814
815
816
817extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
818
819
820
821
822
823extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __attribute__ ((__nothrow__ ));
824
825
826
827extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
828 int __modes, size_t __n) __attribute__ ((__nothrow__ ));
829
830
831
832
833extern void setbuffer (FILE *__restrict __stream, char *__restrict __buf,
834 size_t __size) __attribute__ ((__nothrow__ ));
835
836
837extern void setlinebuf (FILE *__stream) __attribute__ ((__nothrow__ ));
838
839
840
841
842
843
844
845extern int fprintf (FILE *__restrict __stream,
846 const char *__restrict __format, ...);
847
848
849
850
851extern int printf (const char *__restrict __format, ...);
852
853extern int sprintf (char *__restrict __s,
854 const char *__restrict __format, ...) __attribute__ ((__nothrow__));
855
856
857
858
859
860extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
861 __gnuc_va_list __arg);
862
863
864
865
866extern int vprintf (const char *__restrict __format, __gnuc_va_list __arg);
867
868extern int vsprintf (char *__restrict __s, const char *__restrict __format,
869 __gnuc_va_list __arg) __attribute__ ((__nothrow__));
870
871
872
873extern int snprintf (char *__restrict __s, size_t __maxlen,
874 const char *__restrict __format, ...)
875 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 4)));
876
877extern int vsnprintf (char *__restrict __s, size_t __maxlen,
878 const char *__restrict __format, __gnuc_va_list __arg)
879 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 3, 0)));
880
881
882
883
884
885extern int vasprintf (char **__restrict __ptr, const char *__restrict __f,
886 __gnuc_va_list __arg)
887 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0))) __attribute__ ((__warn_unused_result__));
888extern int __asprintf (char **__restrict __ptr,
889 const char *__restrict __fmt, ...)
890 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
891extern int asprintf (char **__restrict __ptr,
892 const char *__restrict __fmt, ...)
893 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3))) __attribute__ ((__warn_unused_result__));
894
895
896
897
898extern int vdprintf (int __fd, const char *__restrict __fmt,
899 __gnuc_va_list __arg)
900 __attribute__ ((__format__ (__printf__, 2, 0)));
901extern int dprintf (int __fd, const char *__restrict __fmt, ...)
902 __attribute__ ((__format__ (__printf__, 2, 3)));
903
904
905
906
907
908
909
910extern int fscanf (FILE *__restrict __stream,
911 const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
912
913
914
915
916extern int scanf (const char *__restrict __format, ...) __attribute__ ((__warn_unused_result__));
917
918extern int sscanf (const char *__restrict __s,
919 const char *__restrict __format, ...) __attribute__ ((__nothrow__ ));
920
921
922
923
924
925
926extern int fscanf (FILE *__restrict __stream, const char *__restrict __format, ...) __asm__ ("" "__isoc99_fscanf") __attribute__ ((__warn_unused_result__));
927
928
929extern int scanf (const char *__restrict __format, ...) __asm__ ("" "__isoc99_scanf") __attribute__ ((__warn_unused_result__));
930
931extern int sscanf (const char *__restrict __s, const char *__restrict __format, ...) __asm__ ("" "__isoc99_sscanf") __attribute__ ((__nothrow__ ));
932extern int vfscanf (FILE *__restrict __s, const char *__restrict __format,
933 __gnuc_va_list __arg)
934 __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__));
935
936
937
938
939
940extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg)
941 __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
942
943
944extern int vsscanf (const char *__restrict __s,
945 const char *__restrict __format, __gnuc_va_list __arg)
946 __attribute__ ((__nothrow__ )) __attribute__ ((__format__ (__scanf__, 2, 0)));
947
948
949
950
951extern int vfscanf (FILE *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vfscanf")
952
953
954
955 __attribute__ ((__format__ (__scanf__, 2, 0))) __attribute__ ((__warn_unused_result__));
956extern int vscanf (const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vscanf")
957
958 __attribute__ ((__format__ (__scanf__, 1, 0))) __attribute__ ((__warn_unused_result__));
959extern int vsscanf (const char *__restrict __s, const char *__restrict __format, __gnuc_va_list __arg) __asm__ ("" "__isoc99_vsscanf") __attribute__ ((__nothrow__ ))
960
961
962
963 __attribute__ ((__format__ (__scanf__, 2, 0)));
964extern int fgetc (FILE *__stream);
965extern int getc (FILE *__stream);
966
967
968
969
970
971extern int getchar (void);
972
973
974
975
976
977
978extern int getc_unlocked (FILE *__stream);
979extern int getchar_unlocked (void);
980extern int fgetc_unlocked (FILE *__stream);
981extern int fputc (int __c, FILE *__stream);
982extern int putc (int __c, FILE *__stream);
983
984
985
986
987
988extern int putchar (int __c);
989extern int fputc_unlocked (int __c, FILE *__stream);
990
991
992
993
994
995
996
997extern int putc_unlocked (int __c, FILE *__stream);
998extern int putchar_unlocked (int __c);
999
1000
1001
1002
1003
1004
1005extern int getw (FILE *__stream);
1006
1007
1008extern int putw (int __w, FILE *__stream);
1009
1010
1011
1012
1013
1014
1015
1016extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
1017 __attribute__ ((__warn_unused_result__));
1018extern char *fgets_unlocked (char *__restrict __s, int __n,
1019 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
1020extern __ssize_t __getdelim (char **__restrict __lineptr,
1021 size_t *__restrict __n, int __delimiter,
1022 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
1023extern __ssize_t getdelim (char **__restrict __lineptr,
1024 size_t *__restrict __n, int __delimiter,
1025 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
1026
1027
1028
1029
1030
1031
1032
1033extern __ssize_t getline (char **__restrict __lineptr,
1034 size_t *__restrict __n,
1035 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
1036
1037
1038
1039
1040
1041
1042
1043extern int fputs (const char *__restrict __s, FILE *__restrict __stream);
1044
1045
1046
1047
1048
1049extern int puts (const char *__s);
1050
1051
1052
1053
1054
1055
1056extern int ungetc (int __c, FILE *__stream);
1057
1058
1059
1060
1061
1062
1063extern size_t fread (void *__restrict __ptr, size_t __size,
1064 size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
1065
1066
1067
1068
1069extern size_t fwrite (const void *__restrict __ptr, size_t __size,
1070 size_t __n, FILE *__restrict __s);
1071extern int fputs_unlocked (const char *__restrict __s,
1072 FILE *__restrict __stream);
1073extern size_t fread_unlocked (void *__restrict __ptr, size_t __size,
1074 size_t __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
1075extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
1076 size_t __n, FILE *__restrict __stream);
1077
1078
1079
1080
1081
1082
1083
1084extern int fseek (FILE *__stream, long int __off, int __whence);
1085
1086
1087
1088
1089extern long int ftell (FILE *__stream) __attribute__ ((__warn_unused_result__));
1090
1091
1092
1093
1094extern void rewind (FILE *__stream);
1095extern int fseeko (FILE *__stream, __off_t __off, int __whence);
1096
1097
1098
1099
1100extern __off_t ftello (FILE *__stream) __attribute__ ((__warn_unused_result__));
1101extern int fgetpos (FILE *__restrict __stream, fpos_t *__restrict __pos);
1102
1103
1104
1105
1106extern int fsetpos (FILE *__stream, const fpos_t *__pos);
1107extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
1108extern __off64_t ftello64 (FILE *__stream) __attribute__ ((__warn_unused_result__));
1109extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
1110extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos);
1111
1112
1113
1114extern void clearerr (FILE *__stream) __attribute__ ((__nothrow__ ));
1115
1116extern int feof (FILE *__stream) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
1117
1118extern int ferror (FILE *__stream) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
1119
1120
1121
1122extern void clearerr_unlocked (FILE *__stream) __attribute__ ((__nothrow__ ));
1123extern int feof_unlocked (FILE *__stream) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
1124extern int ferror_unlocked (FILE *__stream) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
1125
1126
1127
1128
1129
1130
1131
1132extern void perror (const char *__s);
1133
1134
1135
1136
1137
1138
1139extern int sys_nerr;
1140extern const char *const sys_errlist[];
1141
1142
1143extern int _sys_nerr;
1144extern const char *const _sys_errlist[];
1145
1146
1147
1148
1149extern int fileno (FILE *__stream) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
1150
1151
1152
1153
1154extern int fileno_unlocked (FILE *__stream) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
1155extern FILE *popen (const char *__command, const char *__modes) __attribute__ ((__warn_unused_result__));
1156
1157
1158
1159
1160
1161extern int pclose (FILE *__stream);
1162
1163
1164
1165
1166
1167extern char *ctermid (char *__s) __attribute__ ((__nothrow__ ));
1168
1169
1170
1171
1172
1173extern char *cuserid (char *__s);
1174
1175
1176
1177
1178struct obstack;
1179
1180
1181extern int obstack_printf (struct obstack *__restrict __obstack,
1182 const char *__restrict __format, ...)
1183 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 3)));
1184extern int obstack_vprintf (struct obstack *__restrict __obstack,
1185 const char *__restrict __format,
1186 __gnuc_va_list __args)
1187 __attribute__ ((__nothrow__)) __attribute__ ((__format__ (__printf__, 2, 0)));
1188
1189
1190
1191
1192
1193
1194
1195extern void flockfile (FILE *__stream) __attribute__ ((__nothrow__ ));
1196
1197
1198
1199extern int ftrylockfile (FILE *__stream) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
1200
1201
1202extern void funlockfile (FILE *__stream) __attribute__ ((__nothrow__ ));
1203extern int __uflow (FILE *);
1204extern int __overflow (FILE *, int);
1205
1206
1207
1208
1209
1210extern __inline __attribute__ ((__gnu_inline__)) int
1211getchar (void)
1212{
1213 return getc (stdin);
1214}
1215
1216
1217
1218
1219extern __inline __attribute__ ((__gnu_inline__)) int
1220fgetc_unlocked (FILE *__fp)
1221{
1222 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
1223}
1224
1225
1226
1227
1228
1229extern __inline __attribute__ ((__gnu_inline__)) int
1230getc_unlocked (FILE *__fp)
1231{
1232 return (__builtin_expect (((__fp)->_IO_read_ptr >= (__fp)->_IO_read_end), 0) ? __uflow (__fp) : *(unsigned char *) (__fp)->_IO_read_ptr++);
1233}
1234
1235
1236extern __inline __attribute__ ((__gnu_inline__)) int
1237getchar_unlocked (void)
1238{
1239 return (__builtin_expect (((stdin)->_IO_read_ptr >= (stdin)->_IO_read_end), 0) ? __uflow (stdin) : *(unsigned char *) (stdin)->_IO_read_ptr++);
1240}
1241
1242
1243
1244
1245extern __inline __attribute__ ((__gnu_inline__)) int
1246putchar (int __c)
1247{
1248 return putc (__c, stdout);
1249}
1250
1251
1252
1253
1254extern __inline __attribute__ ((__gnu_inline__)) int
1255fputc_unlocked (int __c, FILE *__stream)
1256{
1257 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
1258}
1259
1260
1261
1262
1263
1264extern __inline __attribute__ ((__gnu_inline__)) int
1265putc_unlocked (int __c, FILE *__stream)
1266{
1267 return (__builtin_expect (((__stream)->_IO_write_ptr >= (__stream)->_IO_write_end), 0) ? __overflow (__stream, (unsigned char) (__c)) : (unsigned char) (*(__stream)->_IO_write_ptr++ = (__c)));
1268}
1269
1270
1271extern __inline __attribute__ ((__gnu_inline__)) int
1272putchar_unlocked (int __c)
1273{
1274 return (__builtin_expect (((stdout)->_IO_write_ptr >= (stdout)->_IO_write_end), 0) ? __overflow (stdout, (unsigned char) (__c)) : (unsigned char) (*(stdout)->_IO_write_ptr++ = (__c)));
1275}
1276
1277
1278
1279
1280
1281extern __inline __attribute__ ((__gnu_inline__)) __ssize_t
1282getline (char **__lineptr, size_t *__n, FILE *__stream)
1283{
1284 return __getdelim (__lineptr, __n, '\n', __stream);
1285}
1286
1287
1288
1289
1290
1291extern __inline __attribute__ ((__gnu_inline__)) int
1292__attribute__ ((__nothrow__ )) feof_unlocked (FILE *__stream)
1293{
1294 return (((__stream)->_flags & 0x0010) != 0);
1295}
1296
1297
1298extern __inline __attribute__ ((__gnu_inline__)) int
1299__attribute__ ((__nothrow__ )) ferror_unlocked (FILE *__stream)
1300{
1301 return (((__stream)->_flags & 0x0020) != 0);
1302}
1303
1304
1305
1306
1307
1308
1309
1310extern int __sprintf_chk (char *__restrict __s, int __flag, size_t __slen,
1311 const char *__restrict __format, ...) __attribute__ ((__nothrow__ ));
1312extern int __vsprintf_chk (char *__restrict __s, int __flag, size_t __slen,
1313 const char *__restrict __format,
1314 __gnuc_va_list __ap) __attribute__ ((__nothrow__ ));
1315
1316
1317
1318
1319extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) int
1320__attribute__ ((__nothrow__ )) vsprintf (char *__restrict __s, const char *__restrict __fmt, __gnuc_va_list __ap)
1321
1322{
1323 return __builtin___vsprintf_chk (__s, 2 - 1,
1324 __builtin_object_size (__s, 2 > 1), __fmt, __ap);
1325}
1326
1327
1328
1329extern int __snprintf_chk (char *__restrict __s, size_t __n, int __flag,
1330 size_t __slen, const char *__restrict __format,
1331 ...) __attribute__ ((__nothrow__ ));
1332extern int __vsnprintf_chk (char *__restrict __s, size_t __n, int __flag,
1333 size_t __slen, const char *__restrict __format,
1334 __gnuc_va_list __ap) __attribute__ ((__nothrow__ ));
1335
1336
1337
1338
1339extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) int
1340__attribute__ ((__nothrow__ )) vsnprintf (char *__restrict __s, size_t __n, const char *__restrict __fmt, __gnuc_va_list __ap)
1341
1342{
1343 return __builtin___vsnprintf_chk (__s, __n, 2 - 1,
1344 __builtin_object_size (__s, 2 > 1), __fmt, __ap);
1345}
1346
1347
1348
1349
1350
1351extern int __fprintf_chk (FILE *__restrict __stream, int __flag,
1352 const char *__restrict __format, ...);
1353extern int __printf_chk (int __flag, const char *__restrict __format, ...);
1354extern int __vfprintf_chk (FILE *__restrict __stream, int __flag,
1355 const char *__restrict __format, __gnuc_va_list __ap);
1356extern int __vprintf_chk (int __flag, const char *__restrict __format,
1357 __gnuc_va_list __ap);
1358
1359
1360
1361
1362extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) int
1363vprintf (const char *__restrict __fmt, __gnuc_va_list __ap)
1364{
1365
1366 return __vfprintf_chk (stdout, 2 - 1, __fmt, __ap);
1367
1368
1369
1370}
1371
1372extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) int
1373vfprintf (FILE *__restrict __stream,
1374 const char *__restrict __fmt, __gnuc_va_list __ap)
1375{
1376 return __vfprintf_chk (__stream, 2 - 1, __fmt, __ap);
1377}
1378
1379
1380extern int __dprintf_chk (int __fd, int __flag, const char *__restrict __fmt,
1381 ...) __attribute__ ((__format__ (__printf__, 3, 4)));
1382extern int __vdprintf_chk (int __fd, int __flag,
1383 const char *__restrict __fmt, __gnuc_va_list __arg)
1384 __attribute__ ((__format__ (__printf__, 3, 0)));
1385
1386
1387
1388extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) int
1389vdprintf (int __fd, const char *__restrict __fmt, __gnuc_va_list __ap)
1390{
1391 return __vdprintf_chk (__fd, 2 - 1, __fmt, __ap);
1392}
1393
1394
1395
1396
1397extern int __asprintf_chk (char **__restrict __ptr, int __flag,
1398 const char *__restrict __fmt, ...)
1399 __attribute__ ((__nothrow__ )) __attribute__ ((__format__ (__printf__, 3, 4))) __attribute__ ((__warn_unused_result__));
1400extern int __vasprintf_chk (char **__restrict __ptr, int __flag,
1401 const char *__restrict __fmt, __gnuc_va_list __arg)
1402 __attribute__ ((__nothrow__ )) __attribute__ ((__format__ (__printf__, 3, 0))) __attribute__ ((__warn_unused_result__));
1403extern int __obstack_printf_chk (struct obstack *__restrict __obstack,
1404 int __flag, const char *__restrict __format,
1405 ...)
1406 __attribute__ ((__nothrow__ )) __attribute__ ((__format__ (__printf__, 3, 4)));
1407extern int __obstack_vprintf_chk (struct obstack *__restrict __obstack,
1408 int __flag,
1409 const char *__restrict __format,
1410 __gnuc_va_list __args)
1411 __attribute__ ((__nothrow__ )) __attribute__ ((__format__ (__printf__, 3, 0)));
1412
1413
1414
1415
1416
1417extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) int
1418__attribute__ ((__nothrow__ )) vasprintf (char **__restrict __ptr, const char *__restrict __fmt, __gnuc_va_list __ap)
1419
1420{
1421 return __vasprintf_chk (__ptr, 2 - 1, __fmt, __ap);
1422}
1423
1424extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) int
1425__attribute__ ((__nothrow__ )) obstack_vprintf (struct obstack *__restrict __obstack, const char *__restrict __fmt, __gnuc_va_list __ap)
1426
1427{
1428 return __obstack_vprintf_chk (__obstack, 2 - 1, __fmt,
1429 __ap);
1430}
1431extern char *__fgets_chk (char *__restrict __s, size_t __size, int __n,
1432 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
1433extern char *__fgets_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets") __attribute__ ((__warn_unused_result__));
1434
1435
1436extern char *__fgets_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_chk")
1437
1438
1439 __attribute__ ((__warn_unused_result__)) ;
1440
1441
1442extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__warn_unused_result__)) char *
1443fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
1444{
1445 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
1446 {
1447 if (!__builtin_constant_p (__n) || __n <= 0)
1448 return __fgets_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
1449
1450 if ((size_t) __n > __builtin_object_size (__s, 2 > 1))
1451 return __fgets_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
1452 }
1453 return __fgets_alias (__s, __n, __stream);
1454}
1455
1456extern size_t __fread_chk (void *__restrict __ptr, size_t __ptrlen,
1457 size_t __size, size_t __n,
1458 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
1459extern size_t __fread_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread") __attribute__ ((__warn_unused_result__));
1460
1461
1462
1463extern size_t __fread_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_chk")
1464
1465
1466
1467
1468 __attribute__ ((__warn_unused_result__)) ;
1469
1470
1471extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__warn_unused_result__)) size_t
1472fread (void *__restrict __ptr, size_t __size, size_t __n,
1473 FILE *__restrict __stream)
1474{
1475 if (__builtin_object_size (__ptr, 0) != (size_t) -1)
1476 {
1477 if (!__builtin_constant_p (__size)
1478 || !__builtin_constant_p (__n)
1479 || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
1480 return __fread_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream);
1481
1482 if (__size * __n > __builtin_object_size (__ptr, 0))
1483 return __fread_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n, __stream);
1484 }
1485 return __fread_alias (__ptr, __size, __n, __stream);
1486}
1487
1488
1489extern char *__fgets_unlocked_chk (char *__restrict __s, size_t __size,
1490 int __n, FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
1491extern char *__fgets_unlocked_alias (char *__restrict __s, int __n, FILE *__restrict __stream) __asm__ ("" "fgets_unlocked") __attribute__ ((__warn_unused_result__));
1492
1493
1494extern char *__fgets_unlocked_chk_warn (char *__restrict __s, size_t __size, int __n, FILE *__restrict __stream) __asm__ ("" "__fgets_unlocked_chk")
1495
1496
1497 __attribute__ ((__warn_unused_result__)) ;
1498
1499
1500extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__warn_unused_result__)) char *
1501fgets_unlocked (char *__restrict __s, int __n, FILE *__restrict __stream)
1502{
1503 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1)
1504 {
1505 if (!__builtin_constant_p (__n) || __n <= 0)
1506 return __fgets_unlocked_chk (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
1507
1508 if ((size_t) __n > __builtin_object_size (__s, 2 > 1))
1509 return __fgets_unlocked_chk_warn (__s, __builtin_object_size (__s, 2 > 1), __n, __stream);
1510 }
1511 return __fgets_unlocked_alias (__s, __n, __stream);
1512}
1513
1514
1515
1516extern size_t __fread_unlocked_chk (void *__restrict __ptr, size_t __ptrlen,
1517 size_t __size, size_t __n,
1518 FILE *__restrict __stream) __attribute__ ((__warn_unused_result__));
1519extern size_t __fread_unlocked_alias (void *__restrict __ptr, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "fread_unlocked") __attribute__ ((__warn_unused_result__));
1520
1521
1522
1523extern size_t __fread_unlocked_chk_warn (void *__restrict __ptr, size_t __ptrlen, size_t __size, size_t __n, FILE *__restrict __stream) __asm__ ("" "__fread_unlocked_chk")
1524
1525
1526
1527
1528 __attribute__ ((__warn_unused_result__)) ;
1529
1530
1531extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__warn_unused_result__)) size_t
1532fread_unlocked (void *__restrict __ptr, size_t __size, size_t __n,
1533 FILE *__restrict __stream)
1534{
1535 if (__builtin_object_size (__ptr, 0) != (size_t) -1)
1536 {
1537 if (!__builtin_constant_p (__size)
1538 || !__builtin_constant_p (__n)
1539 || (__size | __n) >= (((size_t) 1) << (8 * sizeof (size_t) / 2)))
1540 return __fread_unlocked_chk (__ptr, __builtin_object_size (__ptr, 0), __size, __n,
1541 __stream);
1542
1543 if (__size * __n > __builtin_object_size (__ptr, 0))
1544 return __fread_unlocked_chk_warn (__ptr, __builtin_object_size (__ptr, 0), __size, __n,
1545 __stream);
1546 }
1547
1548
1549 if (__builtin_constant_p (__size)
1550 && __builtin_constant_p (__n)
1551 && (__size | __n) < (((size_t) 1) << (8 * sizeof (size_t) / 2))
1552 && __size * __n <= 8)
1553 {
1554 size_t __cnt = __size * __n;
1555 char *__cptr = (char *) __ptr;
1556 if (__cnt == 0)
1557 return 0;
1558
1559 for (; __cnt > 0; --__cnt)
1560 {
1561 int __c = getc_unlocked (__stream);
1562 if (__c == (-1))
1563 break;
1564 *__cptr++ = __c;
1565 }
1566 return (__cptr - (char *) __ptr) / __size;
1567 }
1568
1569 return __fread_unlocked_alias (__ptr, __size, __n, __stream);
1570}
1571
1572
1573typedef __u_char u_char;
1574typedef __u_short u_short;
1575typedef __u_int u_int;
1576typedef __u_long u_long;
1577typedef __quad_t quad_t;
1578typedef __u_quad_t u_quad_t;
1579typedef __fsid_t fsid_t;
1580
1581typedef __loff_t loff_t;
1582
1583
1584
1585
1586typedef __ino_t ino_t;
1587
1588
1589
1590
1591
1592typedef __ino64_t ino64_t;
1593
1594
1595
1596typedef __dev_t dev_t;
1597
1598
1599
1600typedef __gid_t gid_t;
1601
1602
1603
1604typedef __mode_t mode_t;
1605
1606
1607
1608typedef __nlink_t nlink_t;
1609
1610
1611
1612typedef __uid_t uid_t;
1613typedef __pid_t pid_t;
1614
1615
1616
1617
1618typedef __id_t id_t;
1619typedef __daddr_t daddr_t;
1620typedef __caddr_t caddr_t;
1621
1622
1623
1624
1625typedef __key_t key_t;
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635typedef __clock_t clock_t;
1636
1637
1638
1639
1640
1641
1642typedef __clockid_t clockid_t;
1643
1644
1645
1646
1647
1648typedef __time_t time_t;
1649
1650
1651
1652
1653
1654typedef __timer_t timer_t;
1655
1656
1657
1658typedef __useconds_t useconds_t;
1659
1660
1661typedef __suseconds_t suseconds_t;
1662
1663
1664
1665
1666
1667
1668
1669typedef unsigned long int ulong;
1670typedef unsigned short int ushort;
1671typedef unsigned int uint;
1672
1673
1674
1675
1676
1677
1678
1679
1680typedef __int8_t int8_t;
1681typedef __int16_t int16_t;
1682typedef __int32_t int32_t;
1683typedef __int64_t int64_t;
1684
1685
1686typedef __uint8_t u_int8_t;
1687typedef __uint16_t u_int16_t;
1688typedef __uint32_t u_int32_t;
1689typedef __uint64_t u_int64_t;
1690
1691
1692typedef int register_t __attribute__ ((__mode__ (__word__)));
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740static __inline __uint16_t
1741__bswap_16 (__uint16_t __bsx)
1742{
1743
1744
1745
1746 return ((__uint16_t) ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)));
1747
1748}
1749
1750
1751
1752
1753
1754static __inline __uint32_t
1755__bswap_32 (__uint32_t __bsx)
1756{
1757
1758
1759
1760 return ((((__bsx) & 0xff000000u) >> 24) | (((__bsx) & 0x00ff0000u) >> 8) | (((__bsx) & 0x0000ff00u) << 8) | (((__bsx) & 0x000000ffu) << 24));
1761
1762}
1763
1764
1765__extension__ static __inline __uint64_t
1766__bswap_64 (__uint64_t __bsx)
1767{
1768
1769
1770
1771 return ((((__bsx) & 0xff00000000000000ull) >> 56) | (((__bsx) & 0x00ff000000000000ull) >> 40) | (((__bsx) & 0x0000ff0000000000ull) >> 24) | (((__bsx) & 0x000000ff00000000ull) >> 8) | (((__bsx) & 0x00000000ff000000ull) << 8) | (((__bsx) & 0x0000000000ff0000ull) << 24) | (((__bsx) & 0x000000000000ff00ull) << 40) | (((__bsx) & 0x00000000000000ffull) << 56));
1772
1773}
1774
1775
1776
1777
1778
1779
1780
1781static __inline __uint16_t
1782__uint16_identity (__uint16_t __x)
1783{
1784 return __x;
1785}
1786
1787static __inline __uint32_t
1788__uint32_identity (__uint32_t __x)
1789{
1790 return __x;
1791}
1792
1793static __inline __uint64_t
1794__uint64_identity (__uint64_t __x)
1795{
1796 return __x;
1797}
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841typedef struct
1842{
1843 unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
1844} __sigset_t;
1845
1846
1847typedef __sigset_t sigset_t;
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857struct timeval
1858{
1859 __time_t tv_sec;
1860 __suseconds_t tv_usec;
1861};
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871struct timespec
1872{
1873 __time_t tv_sec;
1874
1875
1876
1877 __syscall_slong_t tv_nsec;
1878};
1879typedef long int __fd_mask;
1880
1881
1882
1883
1884
1885typedef struct
1886 {
1887
1888
1889
1890 __fd_mask fds_bits[1024 / (8 * (int) sizeof (__fd_mask))];
1891
1892
1893
1894
1895 } fd_set;
1896
1897
1898
1899
1900
1901typedef __fd_mask fd_mask;
1902
1903
1904
1905
1906
1907
1908extern int select (int __nfds, fd_set *__restrict __readfds,
1909 fd_set *__restrict __writefds,
1910 fd_set *__restrict __exceptfds,
1911 struct timeval *__restrict __timeout);
1912extern int pselect (int __nfds, fd_set *__restrict __readfds,
1913 fd_set *__restrict __writefds,
1914 fd_set *__restrict __exceptfds,
1915 const struct timespec *__restrict __timeout,
1916 const __sigset_t *__restrict __sigmask);
1917
1918
1919
1920
1921
1922
1923extern long int __fdelt_chk (long int __d);
1924extern long int __fdelt_warn (long int __d)
1925 ;
1926
1927
1928
1929
1930
1931typedef __blksize_t blksize_t;
1932
1933
1934
1935
1936
1937typedef __blkcnt_t blkcnt_t;
1938
1939
1940typedef __fsblkcnt_t fsblkcnt_t;
1941
1942
1943typedef __fsfilcnt_t fsfilcnt_t;
1944typedef __blkcnt64_t blkcnt64_t;
1945typedef __fsblkcnt64_t fsblkcnt64_t;
1946typedef __fsfilcnt64_t fsfilcnt64_t;
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977typedef struct __pthread_internal_list
1978{
1979 struct __pthread_internal_list *__prev;
1980 struct __pthread_internal_list *__next;
1982
1983typedef struct __pthread_internal_slist
1984{
1985 struct __pthread_internal_slist *__next;
1987
1988struct __pthread_mutex_s
1989{
1990 int __lock;
1991 unsigned int __count;
1992 int __owner;
1993
1994 unsigned int __nusers;
1995
1996
1997
1998 int __kind;
1999
2000 short __spins;
2001 short __elision;
2002 __pthread_list_t __list;
2003};
2004
2005
2006
2008{
2009 unsigned int __readers;
2010 unsigned int __writers;
2011 unsigned int __wrphase_futex;
2012 unsigned int __writers_futex;
2013 unsigned int __pad3;
2014 unsigned int __pad4;
2015
2016 int __cur_writer;
2017 int __shared;
2018 signed char __rwelision;
2019
2020
2021
2022
2023 unsigned char __pad1[7];
2024
2025 unsigned long int __pad2;
2026
2027
2028 unsigned int __flags;
2029};
2030
2031
2032
2033
2034
2035
2036struct __pthread_cond_s
2037{
2038 __extension__ union
2039 {
2040 __extension__ unsigned long long int __wseq;
2041 struct
2042 {
2043 unsigned int __low;
2044 unsigned int __high;
2045 } __wseq32;
2046 };
2047 __extension__ union
2048 {
2049 __extension__ unsigned long long int __g1_start;
2050 struct
2051 {
2052 unsigned int __low;
2053 unsigned int __high;
2054 } __g1_start32;
2055 };
2056 unsigned int __g_refs[2] ;
2057 unsigned int __g_size[2];
2058 unsigned int __g1_orig_size;
2059 unsigned int __wrefs;
2060 unsigned int __g_signals[2];
2061};
2062
2063
2064
2065typedef unsigned long int pthread_t;
2066
2067
2068
2069
2070typedef union
2071{
2072 char __size[4];
2073 int __align;
2075
2076
2077
2078
2079typedef union
2080{
2081 char __size[4];
2082 int __align;
2084
2085
2086
2087typedef unsigned int pthread_key_t;
2088
2089
2090
2091typedef int pthread_once_t;
2092
2093
2094union pthread_attr_t
2095{
2096 char __size[56];
2097 long int __align;
2098};
2099
2100typedef union pthread_attr_t pthread_attr_t;
2101
2102
2103
2104typedef union
2105{
2106 struct __pthread_mutex_s __data;
2107 char __size[40];
2108 long int __align;
2110
2111
2112typedef union
2113{
2114 struct __pthread_cond_s __data;
2115 char __size[48];
2116 __extension__ long long int __align;
2118
2119
2120
2121
2122
2123typedef union
2124{
2125 struct __pthread_rwlock_arch_t __data;
2126 char __size[56];
2127 long int __align;
2129
2130typedef union
2131{
2132 char __size[8];
2133 long int __align;
2135
2136
2137
2138
2139
2140typedef volatile int pthread_spinlock_t;
2141
2142
2143
2144
2145typedef union
2146{
2147 char __size[32];
2148 long int __align;
2150
2151typedef union
2152{
2153 char __size[4];
2154 int __align;
2156
2157
2158
2159
2160
2161
2162
2163
2164struct stat
2165 {
2166 __dev_t st_dev;
2167
2168
2169
2170
2171 __ino_t st_ino;
2172
2173
2174
2175
2176
2177
2178
2179 __nlink_t st_nlink;
2180 __mode_t st_mode;
2181
2182 __uid_t st_uid;
2183 __gid_t st_gid;
2184
2185 int __pad0;
2186
2187 __dev_t st_rdev;
2188
2189
2190
2191
2192 __off_t st_size;
2193
2194
2195
2196 __blksize_t st_blksize;
2197
2198 __blkcnt_t st_blocks;
2199 struct timespec st_atim;
2200 struct timespec st_mtim;
2201 struct timespec st_ctim;
2202 __syscall_slong_t __glibc_reserved[3];
2203 };
2204
2205
2206
2207struct stat64
2208 {
2209 __dev_t st_dev;
2210
2211 __ino64_t st_ino;
2212 __nlink_t st_nlink;
2213 __mode_t st_mode;
2214
2215
2216
2217
2218
2219
2220 __uid_t st_uid;
2221 __gid_t st_gid;
2222
2223 int __pad0;
2224 __dev_t st_rdev;
2225 __off_t st_size;
2226
2227
2228
2229
2230
2231 __blksize_t st_blksize;
2232 __blkcnt64_t st_blocks;
2233
2234
2235
2236
2237
2238
2239
2240 struct timespec st_atim;
2241 struct timespec st_mtim;
2242 struct timespec st_ctim;
2243 __syscall_slong_t __glibc_reserved[3];
2244
2245
2246
2247 };
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310extern int stat (const char *__restrict __file,
2311 struct stat *__restrict __buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
2312
2313
2314
2315extern int fstat (int __fd, struct stat *__buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
2316extern int stat64 (const char *__restrict __file,
2317 struct stat64 *__restrict __buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
2318extern int fstat64 (int __fd, struct stat64 *__buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
2319
2320
2321
2322
2323
2324
2325
2326extern int fstatat (int __fd, const char *__restrict __file,
2327 struct stat *__restrict __buf, int __flag)
2328 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));
2329extern int fstatat64 (int __fd, const char *__restrict __file,
2330 struct stat64 *__restrict __buf, int __flag)
2331 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));
2332
2333
2334
2335
2336
2337
2338
2339extern int lstat (const char *__restrict __file,
2340 struct stat *__restrict __buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
2341extern int lstat64 (const char *__restrict __file,
2342 struct stat64 *__restrict __buf)
2343 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
2344
2345
2346
2347
2348
2349extern int chmod (const char *__file, __mode_t __mode)
2350 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
2351
2352
2353
2354
2355
2356extern int lchmod (const char *__file, __mode_t __mode)
2357 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
2358
2359
2360
2361
2362extern int fchmod (int __fd, __mode_t __mode) __attribute__ ((__nothrow__ ));
2363
2364
2365
2366
2367
2368extern int fchmodat (int __fd, const char *__file, __mode_t __mode,
2369 int __flag)
2370 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
2371
2372
2373
2374
2375
2376
2377extern __mode_t umask (__mode_t __mask) __attribute__ ((__nothrow__ ));
2378
2379
2380
2381
2382extern __mode_t getumask (void) __attribute__ ((__nothrow__ ));
2383
2384
2385
2386extern int mkdir (const char *__path, __mode_t __mode)
2387 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
2388
2389
2390
2391
2392
2393extern int mkdirat (int __fd, const char *__path, __mode_t __mode)
2394 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
2395
2396
2397
2398
2399
2400
2401extern int mknod (const char *__path, __mode_t __mode, __dev_t __dev)
2402 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
2403
2404
2405
2406
2407
2408extern int mknodat (int __fd, const char *__path, __mode_t __mode,
2409 __dev_t __dev) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
2410
2411
2412
2413
2414
2415extern int mkfifo (const char *__path, __mode_t __mode)
2416 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
2417
2418
2419
2420
2421
2422extern int mkfifoat (int __fd, const char *__path, __mode_t __mode)
2423 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
2424
2425
2426
2427
2428
2429extern int utimensat (int __fd, const char *__path,
2430 const struct timespec __times[2],
2431 int __flags)
2432 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
2433
2434
2435
2436
2437extern int futimens (int __fd, const struct timespec __times[2]) __attribute__ ((__nothrow__ ));
2438
2439
2440
2441
2442extern int __fxstat (int __ver, int __fildes, struct stat *__stat_buf)
2443 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));
2444extern int __xstat (int __ver, const char *__filename,
2445 struct stat *__stat_buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));
2446extern int __lxstat (int __ver, const char *__filename,
2447 struct stat *__stat_buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));
2448extern int __fxstatat (int __ver, int __fildes, const char *__filename,
2449 struct stat *__stat_buf, int __flag)
2450 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4)));
2451extern int __fxstat64 (int __ver, int __fildes, struct stat64 *__stat_buf)
2452 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));
2453extern int __xstat64 (int __ver, const char *__filename,
2454 struct stat64 *__stat_buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));
2455extern int __lxstat64 (int __ver, const char *__filename,
2456 struct stat64 *__stat_buf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));
2457extern int __fxstatat64 (int __ver, int __fildes, const char *__filename,
2458 struct stat64 *__stat_buf, int __flag)
2459 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4)));
2460
2461extern int __xmknod (int __ver, const char *__path, __mode_t __mode,
2462 __dev_t *__dev) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));
2463
2464extern int __xmknodat (int __ver, int __fd, const char *__path,
2465 __mode_t __mode, __dev_t *__dev)
2466 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 5)));
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504typedef __signed__ char __s8;
2505typedef unsigned char __u8;
2506
2507typedef __signed__ short __s16;
2508typedef unsigned short __u16;
2509
2510typedef __signed__ int __s32;
2511typedef unsigned int __u32;
2512
2513
2514__extension__ typedef __signed__ long long __s64;
2515__extension__ typedef unsigned long long __u64;
2516
2517
2518
2519
2520
2521
2522
2523
2524typedef struct {
2525 unsigned long fds_bits[1024 / (8 * sizeof(long))];
2527
2528
2529typedef void (*__kernel_sighandler_t)(int);
2530
2531
2532typedef int __kernel_key_t;
2533typedef int __kernel_mqd_t;
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551typedef unsigned short __kernel_old_uid_t;
2552typedef unsigned short __kernel_old_gid_t;
2553
2554typedef unsigned long __kernel_old_dev_t;
2555
2556
2557
2558
2559typedef long __kernel_long_t;
2560typedef unsigned long __kernel_ulong_t;
2561
2562
2563
2564typedef __kernel_ulong_t __kernel_ino_t;
2565
2566
2567
2568typedef unsigned int __kernel_mode_t;
2569
2570
2571
2572typedef int __kernel_pid_t;
2573
2574
2575
2576typedef int __kernel_ipc_pid_t;
2577
2578
2579
2580typedef unsigned int __kernel_uid_t;
2581typedef unsigned int __kernel_gid_t;
2582
2583
2584
2585typedef __kernel_long_t __kernel_suseconds_t;
2586
2587
2588
2589typedef int __kernel_daddr_t;
2590
2591
2592
2593typedef unsigned int __kernel_uid32_t;
2594typedef unsigned int __kernel_gid32_t;
2595typedef __kernel_ulong_t __kernel_size_t;
2596typedef __kernel_long_t __kernel_ssize_t;
2597typedef __kernel_long_t __kernel_ptrdiff_t;
2598
2599
2600
2601
2602typedef struct {
2603 int val[2];
2605
2606
2607
2608
2609
2610typedef __kernel_long_t __kernel_off_t;
2611typedef long long __kernel_loff_t;
2612typedef __kernel_long_t __kernel_old_time_t;
2613typedef __kernel_long_t __kernel_time_t;
2614typedef long long __kernel_time64_t;
2615typedef __kernel_long_t __kernel_clock_t;
2616typedef int __kernel_timer_t;
2617typedef int __kernel_clockid_t;
2618typedef char * __kernel_caddr_t;
2619typedef unsigned short __kernel_uid16_t;
2620typedef unsigned short __kernel_gid16_t;
2621
2622
2623typedef __u16 __le16;
2624typedef __u16 __be16;
2625typedef __u32 __le32;
2626typedef __u32 __be32;
2627typedef __u64 __le64;
2628typedef __u64 __be64;
2629
2630typedef __u16 __sum16;
2631typedef __u32 __wsum;
2632
2633typedef unsigned __poll_t;
2634struct statx_timestamp {
2635 __s64 tv_sec;
2636 __u32 tv_nsec;
2637 __s32 __reserved;
2638};
2639struct statx {
2640
2641 __u32 stx_mask;
2642 __u32 stx_blksize;
2643 __u64 stx_attributes;
2644
2645 __u32 stx_nlink;
2646 __u32 stx_uid;
2647 __u32 stx_gid;
2648 __u16 stx_mode;
2649 __u16 __spare0[1];
2650
2651 __u64 stx_ino;
2652 __u64 stx_size;
2653 __u64 stx_blocks;
2654 __u64 stx_attributes_mask;
2655
2656 struct statx_timestamp stx_atime;
2657 struct statx_timestamp stx_btime;
2658 struct statx_timestamp stx_ctime;
2659 struct statx_timestamp stx_mtime;
2660
2661 __u32 stx_rdev_major;
2662 __u32 stx_rdev_minor;
2663 __u32 stx_dev_major;
2664 __u32 stx_dev_minor;
2665
2666 __u64 __spare2[14];
2667
2668};
2669
2670
2671
2672
2673
2674
2675int statx (int __dirfd, const char *__restrict __path, int __flags,
2676 unsigned int __mask, struct statx *__restrict __buf)
2677 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 5)));
2678
2679
2680
2681
2682
2683extern __inline __attribute__ ((__gnu_inline__)) int
2684__attribute__ ((__nothrow__ )) stat (const char *__path, struct stat *__statbuf)
2685{
2686 return __xstat (1, __path, __statbuf);
2687}
2688
2689
2690extern __inline __attribute__ ((__gnu_inline__)) int
2691__attribute__ ((__nothrow__ )) lstat (const char *__path, struct stat *__statbuf)
2692{
2693 return __lxstat (1, __path, __statbuf);
2694}
2695
2696
2697extern __inline __attribute__ ((__gnu_inline__)) int
2698__attribute__ ((__nothrow__ )) fstat (int __fd, struct stat *__statbuf)
2699{
2700 return __fxstat (1, __fd, __statbuf);
2701}
2702
2703
2704extern __inline __attribute__ ((__gnu_inline__)) int
2705__attribute__ ((__nothrow__ )) fstatat (int __fd, const char *__filename, struct stat *__statbuf, int __flag)
2706
2707{
2708 return __fxstatat (1, __fd, __filename, __statbuf, __flag);
2709}
2710
2711
2712
2713extern __inline __attribute__ ((__gnu_inline__)) int
2714__attribute__ ((__nothrow__ )) mknod (const char *__path, __mode_t __mode, __dev_t __dev)
2715{
2716 return __xmknod (0, __path, __mode, &__dev);
2717}
2718
2719
2720
2721extern __inline __attribute__ ((__gnu_inline__)) int
2722__attribute__ ((__nothrow__ )) mknodat (int __fd, const char *__path, __mode_t __mode, __dev_t __dev)
2723
2724{
2725 return __xmknodat (0, __fd, __path, __mode, &__dev);
2726}
2727
2728
2729
2730
2731
2732extern __inline __attribute__ ((__gnu_inline__)) int
2733__attribute__ ((__nothrow__ )) stat64 (const char *__path, struct stat64 *__statbuf)
2734{
2735 return __xstat64 (1, __path, __statbuf);
2736}
2737
2738
2739extern __inline __attribute__ ((__gnu_inline__)) int
2740__attribute__ ((__nothrow__ )) lstat64 (const char *__path, struct stat64 *__statbuf)
2741{
2742 return __lxstat64 (1, __path, __statbuf);
2743}
2744
2745
2746extern __inline __attribute__ ((__gnu_inline__)) int
2747__attribute__ ((__nothrow__ )) fstat64 (int __fd, struct stat64 *__statbuf)
2748{
2749 return __fxstat64 (1, __fd, __statbuf);
2750}
2751
2752
2753extern __inline __attribute__ ((__gnu_inline__)) int
2754__attribute__ ((__nothrow__ )) fstatat64 (int __fd, const char *__filename, struct stat64 *__statbuf, int __flag)
2755
2756{
2757 return __fxstatat64 (1, __fd, __filename, __statbuf, __flag);
2758}
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794typedef int wchar_t;
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880typedef float _Float32;
2881
2882
2883
2884typedef double _Float64;
2885
2886
2887
2888typedef double _Float32x;
2889
2890
2891
2892typedef long double _Float64x;
2893
2894
2895
2896
2897
2898typedef struct
2899 {
2900 int quot;
2901 int rem;
2902 } div_t;
2903
2904
2905
2906typedef struct
2907 {
2908 long int quot;
2909 long int rem;
2910 } ldiv_t;
2911
2912
2913
2914
2915__extension__ typedef struct
2916 {
2917 long long int quot;
2918 long long int rem;
2919 } lldiv_t;
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931extern size_t __ctype_get_mb_cur_max (void) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
2932
2933
2934
2935extern double atof (const char *__nptr)
2936 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2937
2938extern int atoi (const char *__nptr)
2939 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2940
2941extern long int atol (const char *__nptr)
2942 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2943
2944
2945
2946__extension__ extern long long int atoll (const char *__nptr)
2947 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
2948
2949
2950
2951extern double strtod (const char *__restrict __nptr,
2952 char **__restrict __endptr)
2953 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
2954
2955
2956
2957extern float strtof (const char *__restrict __nptr,
2958 char **__restrict __endptr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
2959
2960extern long double strtold (const char *__restrict __nptr,
2961 char **__restrict __endptr)
2962 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
2963extern _Float32 strtof32 (const char *__restrict __nptr,
2964 char **__restrict __endptr)
2965 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
2966
2967
2968
2969extern _Float64 strtof64 (const char *__restrict __nptr,
2970 char **__restrict __endptr)
2971 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
2972extern _Float32x strtof32x (const char *__restrict __nptr,
2973 char **__restrict __endptr)
2974 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
2975
2976
2977
2978extern _Float64x strtof64x (const char *__restrict __nptr,
2979 char **__restrict __endptr)
2980 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
2981extern long int strtol (const char *__restrict __nptr,
2982 char **__restrict __endptr, int __base)
2983 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
2984
2985extern unsigned long int strtoul (const char *__restrict __nptr,
2986 char **__restrict __endptr, int __base)
2987 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
2988
2989
2990
2991__extension__
2992extern long long int strtoq (const char *__restrict __nptr,
2993 char **__restrict __endptr, int __base)
2994 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
2995
2996__extension__
2997extern unsigned long long int strtouq (const char *__restrict __nptr,
2998 char **__restrict __endptr, int __base)
2999 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
3000
3001
3002
3003
3004__extension__
3005extern long long int strtoll (const char *__restrict __nptr,
3006 char **__restrict __endptr, int __base)
3007 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
3008
3009__extension__
3010extern unsigned long long int strtoull (const char *__restrict __nptr,
3011 char **__restrict __endptr, int __base)
3012 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
3013
3014
3015
3016
3017extern int strfromd (char *__dest, size_t __size, const char *__format,
3018 double __f)
3019 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));
3020
3021extern int strfromf (char *__dest, size_t __size, const char *__format,
3022 float __f)
3023 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));
3024
3025extern int strfroml (char *__dest, size_t __size, const char *__format,
3026 long double __f)
3027 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));
3028extern int strfromf32 (char *__dest, size_t __size, const char * __format,
3029 _Float32 __f)
3030 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));
3031
3032
3033
3034extern int strfromf64 (char *__dest, size_t __size, const char * __format,
3035 _Float64 __f)
3036 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));
3037extern int strfromf32x (char *__dest, size_t __size, const char * __format,
3038 _Float32x __f)
3039 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));
3040
3041
3042
3043extern int strfromf64x (char *__dest, size_t __size, const char * __format,
3044 _Float64x __f)
3045 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));
3046
3047
3048
3049
3050
3051
3052
3053
3054struct __locale_struct
3055{
3056
3057 struct __locale_data *__locales[13];
3058
3059
3060 const unsigned short int *__ctype_b;
3061 const int *__ctype_tolower;
3062 const int *__ctype_toupper;
3063
3064
3065 const char *__names[13];
3066};
3067
3068typedef struct __locale_struct *__locale_t;
3069
3070typedef __locale_t locale_t;
3071
3072extern long int strtol_l (const char *__restrict __nptr,
3073 char **__restrict __endptr, int __base,
3074 locale_t __loc) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 4)));
3075
3076extern unsigned long int strtoul_l (const char *__restrict __nptr,
3077 char **__restrict __endptr,
3078 int __base, locale_t __loc)
3079 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 4)));
3080
3081__extension__
3082extern long long int strtoll_l (const char *__restrict __nptr,
3083 char **__restrict __endptr, int __base,
3084 locale_t __loc)
3085 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 4)));
3086
3087__extension__
3088extern unsigned long long int strtoull_l (const char *__restrict __nptr,
3089 char **__restrict __endptr,
3090 int __base, locale_t __loc)
3091 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 4)));
3092
3093extern double strtod_l (const char *__restrict __nptr,
3094 char **__restrict __endptr, locale_t __loc)
3095 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3)));
3096
3097extern float strtof_l (const char *__restrict __nptr,
3098 char **__restrict __endptr, locale_t __loc)
3099 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3)));
3100
3101extern long double strtold_l (const char *__restrict __nptr,
3102 char **__restrict __endptr,
3103 locale_t __loc)
3104 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3)));
3105extern _Float32 strtof32_l (const char *__restrict __nptr,
3106 char **__restrict __endptr,
3107 locale_t __loc)
3108 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3)));
3109
3110
3111
3112extern _Float64 strtof64_l (const char *__restrict __nptr,
3113 char **__restrict __endptr,
3114 locale_t __loc)
3115 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3)));
3116extern _Float32x strtof32x_l (const char *__restrict __nptr,
3117 char **__restrict __endptr,
3118 locale_t __loc)
3119 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3)));
3120
3121
3122
3123extern _Float64x strtof64x_l (const char *__restrict __nptr,
3124 char **__restrict __endptr,
3125 locale_t __loc)
3126 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3)));
3127extern __inline __attribute__ ((__gnu_inline__)) int
3128__attribute__ ((__nothrow__ )) atoi (const char *__nptr)
3129{
3130 return (int) strtol (__nptr, (char **) ((void*)0), 10);
3131}
3132extern __inline __attribute__ ((__gnu_inline__)) long int
3133__attribute__ ((__nothrow__ )) atol (const char *__nptr)
3134{
3135 return strtol (__nptr, (char **) ((void*)0), 10);
3136}
3137
3138
3139__extension__ extern __inline __attribute__ ((__gnu_inline__)) long long int
3140__attribute__ ((__nothrow__ )) atoll (const char *__nptr)
3141{
3142 return strtoll (__nptr, (char **) ((void*)0), 10);
3143}
3144extern char *l64a (long int __n) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
3145
3146
3147extern long int a64l (const char *__s)
3148 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3149extern long int random (void) __attribute__ ((__nothrow__ ));
3150
3151
3152extern void srandom (unsigned int __seed) __attribute__ ((__nothrow__ ));
3153
3154
3155
3156
3157
3158extern char *initstate (unsigned int __seed, char *__statebuf,
3159 size_t __statelen) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
3160
3161
3162
3163extern char *setstate (char *__statebuf) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
3164
3165
3166
3167
3168
3169
3170
3171struct random_data
3172 {
3173 int32_t *fptr;
3174 int32_t *rptr;
3175 int32_t *state;
3176 int rand_type;
3177 int rand_deg;
3178 int rand_sep;
3179 int32_t *end_ptr;
3180 };
3181
3182extern int random_r (struct random_data *__restrict __buf,
3183 int32_t *__restrict __result) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
3184
3185extern int srandom_r (unsigned int __seed, struct random_data *__buf)
3186 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
3187
3188extern int initstate_r (unsigned int __seed, char *__restrict __statebuf,
3189 size_t __statelen,
3190 struct random_data *__restrict __buf)
3191 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));
3192
3193extern int setstate_r (char *__restrict __statebuf,
3194 struct random_data *__restrict __buf)
3195 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
3196
3197
3198
3199
3200
3201extern int rand (void) __attribute__ ((__nothrow__ ));
3202
3203extern void srand (unsigned int __seed) __attribute__ ((__nothrow__ ));
3204
3205
3206
3207extern int rand_r (unsigned int *__seed) __attribute__ ((__nothrow__ ));
3208
3209
3210
3211
3212
3213
3214
3215extern double drand48 (void) __attribute__ ((__nothrow__ ));
3216extern double erand48 (unsigned short int __xsubi[3]) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
3217
3218
3219extern long int lrand48 (void) __attribute__ ((__nothrow__ ));
3220extern long int nrand48 (unsigned short int __xsubi[3])
3221 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
3222
3223
3224extern long int mrand48 (void) __attribute__ ((__nothrow__ ));
3225extern long int jrand48 (unsigned short int __xsubi[3])
3226 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
3227
3228
3229extern void srand48 (long int __seedval) __attribute__ ((__nothrow__ ));
3230extern unsigned short int *seed48 (unsigned short int __seed16v[3])
3231 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
3232extern void lcong48 (unsigned short int __param[7]) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
3233
3234
3235
3236
3237
3238struct drand48_data
3239 {
3240 unsigned short int __x[3];
3241 unsigned short int __old_x[3];
3242 unsigned short int __c;
3243 unsigned short int __init;
3244 __extension__ unsigned long long int __a;
3245
3246 };
3247
3248
3249extern int drand48_r (struct drand48_data *__restrict __buffer,
3250 double *__restrict __result) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
3251extern int erand48_r (unsigned short int __xsubi[3],
3252 struct drand48_data *__restrict __buffer,
3253 double *__restrict __result) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
3254
3255
3256extern int lrand48_r (struct drand48_data *__restrict __buffer,
3257 long int *__restrict __result)
3258 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
3259extern int nrand48_r (unsigned short int __xsubi[3],
3260 struct drand48_data *__restrict __buffer,
3261 long int *__restrict __result)
3262 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
3263
3264
3265extern int mrand48_r (struct drand48_data *__restrict __buffer,
3266 long int *__restrict __result)
3267 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
3268extern int jrand48_r (unsigned short int __xsubi[3],
3269 struct drand48_data *__restrict __buffer,
3270 long int *__restrict __result)
3271 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
3272
3273
3274extern int srand48_r (long int __seedval, struct drand48_data *__buffer)
3275 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
3276
3277extern int seed48_r (unsigned short int __seed16v[3],
3278 struct drand48_data *__buffer) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
3279
3280extern int lcong48_r (unsigned short int __param[7],
3281 struct drand48_data *__buffer)
3282 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
3283
3284
3285
3286
3287extern void *malloc (size_t __size) __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__))
3288 __attribute__ ((__warn_unused_result__));
3289
3290extern void *calloc (size_t __nmemb, size_t __size)
3291 __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
3292
3293
3294
3295
3296
3297
3298extern void *realloc (void *__ptr, size_t __size)
3299 __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__)) ;
3300
3301
3302
3303
3304
3305
3306
3307extern void *reallocarray (void *__ptr, size_t __nmemb, size_t __size)
3308 __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__))
3309 ;
3310
3311
3312
3313extern void free (void *__ptr) __attribute__ ((__nothrow__ ));
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327extern void *alloca (size_t __size) __attribute__ ((__nothrow__ ));
3328
3329
3330
3331
3332
3333
3334
3335extern void *valloc (size_t __size) __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__))
3336 __attribute__ ((__warn_unused_result__));
3337
3338
3339
3340
3341extern int posix_memalign (void **__memptr, size_t __alignment, size_t __size)
3342 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3343
3344
3345
3346
3347extern void *aligned_alloc (size_t __alignment, size_t __size)
3348 __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) __attribute__ ((__warn_unused_result__));
3349
3350
3351
3352extern void abort (void) __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));
3353
3354
3355
3356extern int atexit (void (*__func) (void)) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
3357
3358
3359
3360
3361
3362
3363
3364extern int at_quick_exit (void (*__func) (void)) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
3365
3366
3367
3368
3369
3370
3371extern int on_exit (void (*__func) (int __status, void *__arg), void *__arg)
3372 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
3373
3374
3375
3376
3377
3378extern void exit (int __status) __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));
3379
3380
3381
3382
3383
3384extern void quick_exit (int __status) __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));
3385
3386
3387
3388
3389
3390extern void _Exit (int __status) __attribute__ ((__nothrow__ )) __attribute__ ((__noreturn__));
3391
3392
3393
3394
3395extern char *getenv (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3396
3397
3398
3399
3400extern char *secure_getenv (const char *__name)
3401 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3402
3403
3404
3405
3406
3407
3408extern int putenv (char *__string) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
3409
3410
3411
3412
3413
3414extern int setenv (const char *__name, const char *__value, int __replace)
3415 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
3416
3417
3418extern int unsetenv (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
3419
3420
3421
3422
3423
3424
3425extern int clearenv (void) __attribute__ ((__nothrow__ ));
3426extern char *mktemp (char *__template) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
3427extern int mkstemp (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3428extern int mkstemp64 (char *__template) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3429extern int mkstemps (char *__template, int __suffixlen) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3430extern int mkstemps64 (char *__template, int __suffixlen)
3431 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3432extern char *mkdtemp (char *__template) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3433extern int mkostemp (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3434extern int mkostemp64 (char *__template, int __flags) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3435extern int mkostemps (char *__template, int __suffixlen, int __flags)
3436 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3437extern int mkostemps64 (char *__template, int __suffixlen, int __flags)
3438 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3439extern int system (const char *__command) __attribute__ ((__warn_unused_result__));
3440
3441
3442
3443
3444
3445extern char *canonicalize_file_name (const char *__name)
3446 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3447extern char *realpath (const char *__restrict __name,
3448 char *__restrict __resolved) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
3449
3450
3451
3452
3453
3454typedef int (*__compar_fn_t) (const void *, const void *);
3455
3456
3457typedef __compar_fn_t comparison_fn_t;
3458
3459
3460
3461typedef int (*__compar_d_fn_t) (const void *, const void *, void *);
3462
3463
3464
3465
3466extern void *bsearch (const void *__key, const void *__base,
3467 size_t __nmemb, size_t __size, __compar_fn_t __compar)
3468 __attribute__ ((__nonnull__ (1, 2, 5))) __attribute__ ((__warn_unused_result__));
3469
3470
3471
3472extern __inline __attribute__ ((__gnu_inline__)) void *
3473bsearch (const void *__key, const void *__base, size_t __nmemb, size_t __size,
3474 __compar_fn_t __compar)
3475{
3476 size_t __l, __u, __idx;
3477 const void *__p;
3478 int __comparison;
3479
3480 __l = 0;
3481 __u = __nmemb;
3482 while (__l < __u)
3483 {
3484 __idx = (__l + __u) / 2;
3485 __p = (void *) (((const char *) __base) + (__idx * __size));
3486 __comparison = (*__compar) (__key, __p);
3487 if (__comparison < 0)
3488 __u = __idx;
3489 else if (__comparison > 0)
3490 __l = __idx + 1;
3491 else
3492 return (void *) __p;
3493 }
3494
3495 return ((void*)0);
3496}
3497
3498
3499
3500
3501extern void qsort (void *__base, size_t __nmemb, size_t __size,
3502 __compar_fn_t __compar) __attribute__ ((__nonnull__ (1, 4)));
3503
3504extern void qsort_r (void *__base, size_t __nmemb, size_t __size,
3505 __compar_d_fn_t __compar, void *__arg)
3506 __attribute__ ((__nonnull__ (1, 4)));
3507
3508
3509
3510
3511extern int abs (int __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
3512extern long int labs (long int __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
3513
3514
3515__extension__ extern long long int llabs (long long int __x)
3516 __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
3517
3518
3519
3520
3521
3522
3523extern div_t div (int __numer, int __denom)
3524 __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
3525extern ldiv_t ldiv (long int __numer, long int __denom)
3526 __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
3527
3528
3529__extension__ extern lldiv_t lldiv (long long int __numer,
3530 long long int __denom)
3531 __attribute__ ((__nothrow__ )) __attribute__ ((__const__)) __attribute__ ((__warn_unused_result__));
3532extern char *ecvt (double __value, int __ndigit, int *__restrict __decpt,
3533 int *__restrict __sign) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
3534
3535
3536
3537
3538extern char *fcvt (double __value, int __ndigit, int *__restrict __decpt,
3539 int *__restrict __sign) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
3540
3541
3542
3543
3544extern char *gcvt (double __value, int __ndigit, char *__buf)
3545 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
3546
3547
3548
3549
3550extern char *qecvt (long double __value, int __ndigit,
3551 int *__restrict __decpt, int *__restrict __sign)
3552 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
3553extern char *qfcvt (long double __value, int __ndigit,
3554 int *__restrict __decpt, int *__restrict __sign)
3555 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4))) __attribute__ ((__warn_unused_result__));
3556extern char *qgcvt (long double __value, int __ndigit, char *__buf)
3557 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3))) __attribute__ ((__warn_unused_result__));
3558
3559
3560
3561
3562extern int ecvt_r (double __value, int __ndigit, int *__restrict __decpt,
3563 int *__restrict __sign, char *__restrict __buf,
3564 size_t __len) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));
3565extern int fcvt_r (double __value, int __ndigit, int *__restrict __decpt,
3566 int *__restrict __sign, char *__restrict __buf,
3567 size_t __len) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));
3568
3569extern int qecvt_r (long double __value, int __ndigit,
3570 int *__restrict __decpt, int *__restrict __sign,
3571 char *__restrict __buf, size_t __len)
3572 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));
3573extern int qfcvt_r (long double __value, int __ndigit,
3574 int *__restrict __decpt, int *__restrict __sign,
3575 char *__restrict __buf, size_t __len)
3576 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3, 4, 5)));
3577
3578
3579
3580
3581
3582extern int mblen (const char *__s, size_t __n) __attribute__ ((__nothrow__ ));
3583
3584
3585extern int mbtowc (wchar_t *__restrict __pwc,
3586 const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ ));
3587
3588
3589extern int wctomb (char *__s, wchar_t __wchar) __attribute__ ((__nothrow__ ));
3590
3591
3592
3593extern size_t mbstowcs (wchar_t *__restrict __pwcs,
3594 const char *__restrict __s, size_t __n) __attribute__ ((__nothrow__ ));
3595
3596extern size_t wcstombs (char *__restrict __s,
3597 const wchar_t *__restrict __pwcs, size_t __n)
3598 __attribute__ ((__nothrow__ ));
3599
3600
3601
3602
3603
3604
3605
3606extern int rpmatch (const char *__response) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
3607extern int getsubopt (char **__restrict __optionp,
3608 char *const *__restrict __tokens,
3609 char **__restrict __valuep)
3610 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2, 3))) __attribute__ ((__warn_unused_result__));
3611
3612
3613
3614
3615
3616
3617
3618extern int posix_openpt (int __oflag) __attribute__ ((__warn_unused_result__));
3619
3620
3621
3622
3623
3624
3625
3626extern int grantpt (int __fd) __attribute__ ((__nothrow__ ));
3627
3628
3629
3630extern int unlockpt (int __fd) __attribute__ ((__nothrow__ ));
3631
3632
3633
3634
3635extern char *ptsname (int __fd) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
3636
3637
3638
3639
3640
3641
3642extern int ptsname_r (int __fd, char *__buf, size_t __buflen)
3643 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
3644
3645
3646extern int getpt (void);
3647
3648
3649
3650
3651
3652
3653extern int getloadavg (double __loadavg[], int __nelem)
3654 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
3655extern __inline __attribute__ ((__gnu_inline__)) double
3656__attribute__ ((__nothrow__ )) atof (const char *__nptr)
3657{
3658 return strtod (__nptr, (char **) ((void*)0));
3659}
3660
3661
3662
3663extern char *__realpath_chk (const char *__restrict __name,
3664 char *__restrict __resolved,
3665 size_t __resolvedlen) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
3666extern char *__realpath_alias (const char *__restrict __name, char *__restrict __resolved) __asm__ ("" "realpath") __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
3667
3668
3669extern char *__realpath_chk_warn (const char *__restrict __name, char *__restrict __resolved, size_t __resolvedlen) __asm__ ("" "__realpath_chk") __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__))
3670
3671
3672
3673
3674 ;
3675
3676extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__warn_unused_result__)) char *
3677__attribute__ ((__nothrow__ )) realpath (const char *__restrict __name, char *__restrict __resolved)
3678{
3679 if (__builtin_object_size (__resolved, 2 > 1) != (size_t) -1)
3680 {
3681
3682
3683
3684
3685 return __realpath_chk (__name, __resolved, __builtin_object_size (__resolved, 2 > 1));
3686 }
3687
3688 return __realpath_alias (__name, __resolved);
3689}
3690
3691
3692extern int __ptsname_r_chk (int __fd, char *__buf, size_t __buflen,
3693 size_t __nreal) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
3694extern int __ptsname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ptsname_r") __attribute__ ((__nothrow__ ))
3695
3696 __attribute__ ((__nonnull__ (2)));
3697extern int __ptsname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ptsname_r_chk") __attribute__ ((__nothrow__ ))
3698
3699
3700 __attribute__ ((__nonnull__ (2))) ;
3701
3702
3703extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) int
3704__attribute__ ((__nothrow__ )) ptsname_r (int __fd, char *__buf, size_t __buflen)
3705{
3706 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
3707 {
3708 if (!__builtin_constant_p (__buflen))
3709 return __ptsname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
3710 if (__buflen > __builtin_object_size (__buf, 2 > 1))
3711 return __ptsname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
3712 }
3713 return __ptsname_r_alias (__fd, __buf, __buflen);
3714}
3715
3716
3717extern int __wctomb_chk (char *__s, wchar_t __wchar, size_t __buflen)
3718 __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
3719extern int __wctomb_alias (char *__s, wchar_t __wchar) __asm__ ("" "wctomb") __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
3720
3721
3722extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__warn_unused_result__)) int
3723__attribute__ ((__nothrow__ )) wctomb (char *__s, wchar_t __wchar)
3724{
3725
3726
3727
3728
3729
3730
3731 if (__builtin_object_size (__s, 2 > 1) != (size_t) -1 && 16 > __builtin_object_size (__s, 2 > 1))
3732 return __wctomb_chk (__s, __wchar, __builtin_object_size (__s, 2 > 1));
3733 return __wctomb_alias (__s, __wchar);
3734}
3735
3736
3737extern size_t __mbstowcs_chk (wchar_t *__restrict __dst,
3738 const char *__restrict __src,
3739 size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ ));
3740extern size_t __mbstowcs_alias (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len) __asm__ ("" "mbstowcs") __attribute__ ((__nothrow__ ));
3741
3742
3743
3744extern size_t __mbstowcs_chk_warn (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__mbstowcs_chk") __attribute__ ((__nothrow__ ))
3745
3746
3747
3748
3749 ;
3750
3751extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) size_t
3752__attribute__ ((__nothrow__ )) mbstowcs (wchar_t *__restrict __dst, const char *__restrict __src, size_t __len)
3753
3754{
3755 if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
3756 {
3757 if (!__builtin_constant_p (__len))
3758 return __mbstowcs_chk (__dst, __src, __len,
3759 __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
3760
3761 if (__len > __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t))
3762 return __mbstowcs_chk_warn (__dst, __src, __len,
3763 __builtin_object_size (__dst, 2 > 1) / sizeof (wchar_t));
3764 }
3765 return __mbstowcs_alias (__dst, __src, __len);
3766}
3767
3768
3769extern size_t __wcstombs_chk (char *__restrict __dst,
3770 const wchar_t *__restrict __src,
3771 size_t __len, size_t __dstlen) __attribute__ ((__nothrow__ ));
3772extern size_t __wcstombs_alias (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len) __asm__ ("" "wcstombs") __attribute__ ((__nothrow__ ));
3773
3774
3775
3776extern size_t __wcstombs_chk_warn (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len, size_t __dstlen) __asm__ ("" "__wcstombs_chk") __attribute__ ((__nothrow__ ))
3777
3778
3779
3780 ;
3781
3782extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) size_t
3783__attribute__ ((__nothrow__ )) wcstombs (char *__restrict __dst, const wchar_t *__restrict __src, size_t __len)
3784
3785{
3786 if (__builtin_object_size (__dst, 2 > 1) != (size_t) -1)
3787 {
3788 if (!__builtin_constant_p (__len))
3789 return __wcstombs_chk (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1));
3790 if (__len > __builtin_object_size (__dst, 2 > 1))
3791 return __wcstombs_chk_warn (__dst, __src, __len, __builtin_object_size (__dst, 2 > 1));
3792 }
3793 return __wcstombs_alias (__dst, __src, __len);
3794}
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804typedef long int ptrdiff_t;
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874extern void *memcpy (void *__restrict __dest, const void *__restrict __src,
3875 size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
3876
3877
3878extern void *memmove (void *__dest, const void *__src, size_t __n)
3879 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
3880
3881
3882
3883
3884
3885extern void *memccpy (void *__restrict __dest, const void *__restrict __src,
3886 int __c, size_t __n)
3887 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
3888
3889
3890
3891
3892extern void *memset (void *__s, int __c, size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
3893
3894
3895extern int memcmp (const void *__s1, const void *__s2, size_t __n)
3896 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3897extern void *memchr (const void *__s, int __c, size_t __n)
3898 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3899extern void *rawmemchr (const void *__s, int __c)
3900 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3901extern void *memrchr (const void *__s, int __c, size_t __n)
3902 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3903
3904
3905
3906
3907
3908extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
3909 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
3910
3911extern char *strncpy (char *__restrict __dest,
3912 const char *__restrict __src, size_t __n)
3913 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
3914
3915
3916extern char *strcat (char *__restrict __dest, const char *__restrict __src)
3917 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
3918
3919extern char *strncat (char *__restrict __dest, const char *__restrict __src,
3920 size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
3921
3922
3923extern int strcmp (const char *__s1, const char *__s2)
3924 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3925
3926extern int strncmp (const char *__s1, const char *__s2, size_t __n)
3927 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3928
3929
3930extern int strcoll (const char *__s1, const char *__s2)
3931 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3932
3933extern size_t strxfrm (char *__restrict __dest,
3934 const char *__restrict __src, size_t __n)
3935 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
3936
3937
3938
3939
3940
3941
3942extern int strcoll_l (const char *__s1, const char *__s2, locale_t __l)
3943 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
3944
3945
3946extern size_t strxfrm_l (char *__dest, const char *__src, size_t __n,
3947 locale_t __l) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4)));
3948
3949
3950
3951
3952
3953extern char *strdup (const char *__s)
3954 __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
3955
3956
3957
3958
3959
3960
3961extern char *strndup (const char *__string, size_t __n)
3962 __attribute__ ((__nothrow__ )) __attribute__ ((__malloc__)) __attribute__ ((__nonnull__ (1)));
3963
3964
3965
3966
3967extern char *strchr (const char *__s, int __c)
3968 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3969extern char *strrchr (const char *__s, int __c)
3970 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3971extern char *strchrnul (const char *__s, int __c)
3972 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
3973
3974
3975
3976
3977
3978extern size_t strcspn (const char *__s, const char *__reject)
3979 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3980
3981
3982extern size_t strspn (const char *__s, const char *__accept)
3983 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3984extern char *strpbrk (const char *__s, const char *__accept)
3985 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3986extern char *strstr (const char *__haystack, const char *__needle)
3987 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
3988
3989
3990
3991
3992extern char *strtok (char *__restrict __s, const char *__restrict __delim)
3993 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
3994
3995
3996
3997extern char *__strtok_r (char *__restrict __s,
3998 const char *__restrict __delim,
3999 char **__restrict __save_ptr)
4000 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));
4001
4002extern char *strtok_r (char *__restrict __s, const char *__restrict __delim,
4003 char **__restrict __save_ptr)
4004 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));
4005extern char *strcasestr (const char *__haystack, const char *__needle)
4006 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
4007
4008
4009
4010
4011
4012
4013
4014extern void *memmem (const void *__haystack, size_t __haystacklen,
4015 const void *__needle, size_t __needlelen)
4016 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 3)));
4017
4018
4019
4020extern void *__mempcpy (void *__restrict __dest,
4021 const void *__restrict __src, size_t __n)
4022 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
4023extern void *mempcpy (void *__restrict __dest,
4024 const void *__restrict __src, size_t __n)
4025 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
4026
4027
4028
4029
4030extern size_t strlen (const char *__s)
4031 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
4032
4033
4034
4035
4036extern size_t strnlen (const char *__string, size_t __maxlen)
4037 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
4038
4039
4040
4041
4042extern char *strerror (int __errnum) __attribute__ ((__nothrow__ ));
4043extern char *strerror_r (int __errnum, char *__buf, size_t __buflen)
4044 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
4045
4046
4047
4048
4049
4050extern char *strerror_l (int __errnum, locale_t __l) __attribute__ ((__nothrow__ ));
4051
4052
4053
4054
4055
4056
4057
4058extern int bcmp (const void *__s1, const void *__s2, size_t __n)
4059 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
4060
4061
4062extern void bcopy (const void *__src, void *__dest, size_t __n)
4063 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
4064
4065
4066extern void bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
4067extern char *index (const char *__s, int __c)
4068 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
4069extern char *rindex (const char *__s, int __c)
4070 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
4071
4072
4073
4074
4075
4076
4077extern int ffs (int __i) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
4078
4079
4080
4081
4082
4083extern int ffsl (long int __l) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
4084__extension__ extern int ffsll (long long int __ll)
4085 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
4086
4087
4088
4089extern int strcasecmp (const char *__s1, const char *__s2)
4090 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
4091
4092
4093extern int strncasecmp (const char *__s1, const char *__s2, size_t __n)
4094 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
4095
4096
4097
4098
4099
4100
4101extern int strcasecmp_l (const char *__s1, const char *__s2, locale_t __loc)
4102 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 3)));
4103
4104
4105
4106extern int strncasecmp_l (const char *__s1, const char *__s2,
4107 size_t __n, locale_t __loc)
4108 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2, 4)));
4109
4110extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) void
4111__attribute__ ((__nothrow__ )) bcopy (const void *__src, void *__dest, size_t __len)
4112{
4113 (void) __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
4114}
4115
4116extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) void
4117__attribute__ ((__nothrow__ )) bzero (void *__dest, size_t __len)
4118{
4119 (void) __builtin___memset_chk (__dest, '\0', __len, __builtin_object_size (__dest, 0));
4120}
4121
4122
4123
4124extern void explicit_bzero (void *__s, size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
4125
4126
4127
4128extern char *strsep (char **__restrict __stringp,
4129 const char *__restrict __delim)
4130 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
4131
4132
4133
4134
4135extern char *strsignal (int __sig) __attribute__ ((__nothrow__ ));
4136
4137
4138extern char *__stpcpy (char *__restrict __dest, const char *__restrict __src)
4139 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
4140extern char *stpcpy (char *__restrict __dest, const char *__restrict __src)
4141 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
4142
4143
4144
4145extern char *__stpncpy (char *__restrict __dest,
4146 const char *__restrict __src, size_t __n)
4147 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
4148extern char *stpncpy (char *__restrict __dest,
4149 const char *__restrict __src, size_t __n)
4150 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
4151
4152
4153
4154
4155extern int strverscmp (const char *__s1, const char *__s2)
4156 __attribute__ ((__nothrow__ )) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1, 2)));
4157
4158
4159extern char *strfry (char *__string) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
4160
4161
4162extern void *memfrob (void *__s, size_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
4163extern char *basename (const char *__filename) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178extern void __warn_memset_zero_len (void);
4179
4180
4181
4182extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) void *
4183__attribute__ ((__nothrow__ )) memcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)
4184
4185{
4186 return __builtin___memcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
4187}
4188
4189extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) void *
4190__attribute__ ((__nothrow__ )) memmove (void *__dest, const void *__src, size_t __len)
4191{
4192 return __builtin___memmove_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
4193}
4194
4195
4196extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) void *
4197__attribute__ ((__nothrow__ )) mempcpy (void *__restrict __dest, const void *__restrict __src, size_t __len)
4198
4199{
4200 return __builtin___mempcpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 0));
4201}
4202extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) void *
4203__attribute__ ((__nothrow__ )) memset (void *__dest, int __ch, size_t __len)
4204{
4205
4206
4207
4208 if (__builtin_constant_p (__len) && __len == 0
4209 && (!__builtin_constant_p (__ch) || __ch != 0))
4210 {
4211 __warn_memset_zero_len ();
4212 return __dest;
4213 }
4214
4215 return __builtin___memset_chk (__dest, __ch, __len, __builtin_object_size (__dest, 0));
4216}
4217
4218
4219
4220
4221void __explicit_bzero_chk (void *__dest, size_t __len, size_t __destlen)
4222 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
4223
4224extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) void
4225__attribute__ ((__nothrow__ )) explicit_bzero (void *__dest, size_t __len)
4226{
4227 __explicit_bzero_chk (__dest, __len, __builtin_object_size (__dest, 0));
4228}
4229
4230
4231extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char *
4232__attribute__ ((__nothrow__ )) strcpy (char *__restrict __dest, const char *__restrict __src)
4233{
4234 return __builtin___strcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
4235}
4236
4237
4238extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char *
4239__attribute__ ((__nothrow__ )) stpcpy (char *__restrict __dest, const char *__restrict __src)
4240{
4241 return __builtin___stpcpy_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
4242}
4243
4244
4245
4246extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char *
4247__attribute__ ((__nothrow__ )) strncpy (char *__restrict __dest, const char *__restrict __src, size_t __len)
4248
4249{
4250 return __builtin___strncpy_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1));
4251}
4252
4253
4254extern char *__stpncpy_chk (char *__dest, const char *__src, size_t __n,
4255 size_t __destlen) __attribute__ ((__nothrow__ ));
4256extern char *__stpncpy_alias (char *__dest, const char *__src, size_t __n) __asm__ ("" "stpncpy") __attribute__ ((__nothrow__ ));
4257
4258
4259extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char *
4260__attribute__ ((__nothrow__ )) stpncpy (char *__dest, const char *__src, size_t __n)
4261{
4262 if (__builtin_object_size (__dest, 2 > 1) != (size_t) -1
4263 && (!__builtin_constant_p (__n) || __n > __builtin_object_size (__dest, 2 > 1)))
4264 return __stpncpy_chk (__dest, __src, __n, __builtin_object_size (__dest, 2 > 1));
4265 return __stpncpy_alias (__dest, __src, __n);
4266}
4267
4268
4269extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char *
4270__attribute__ ((__nothrow__ )) strcat (char *__restrict __dest, const char *__restrict __src)
4271{
4272 return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
4273}
4274
4275
4276extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) char *
4277__attribute__ ((__nothrow__ )) strncat (char *__restrict __dest, const char *__restrict __src, size_t __len)
4278
4279{
4280 return __builtin___strncat_chk (__dest, __src, __len, __builtin_object_size (__dest, 2 > 1));
4281}
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348typedef __uint8_t uint8_t;
4349typedef __uint16_t uint16_t;
4350typedef __uint32_t uint32_t;
4351typedef __uint64_t uint64_t;
4352
4353
4354
4355
4356
4357typedef __int_least8_t int_least8_t;
4358typedef __int_least16_t int_least16_t;
4359typedef __int_least32_t int_least32_t;
4360typedef __int_least64_t int_least64_t;
4361
4362
4363typedef __uint_least8_t uint_least8_t;
4364typedef __uint_least16_t uint_least16_t;
4365typedef __uint_least32_t uint_least32_t;
4366typedef __uint_least64_t uint_least64_t;
4367
4368
4369
4370
4371
4372typedef signed char int_fast8_t;
4373
4374typedef long int int_fast16_t;
4375typedef long int int_fast32_t;
4376typedef long int int_fast64_t;
4377typedef unsigned char uint_fast8_t;
4378
4379typedef unsigned long int uint_fast16_t;
4380typedef unsigned long int uint_fast32_t;
4381typedef unsigned long int uint_fast64_t;
4382typedef long int intptr_t;
4383
4384typedef unsigned long int uintptr_t;
4385typedef __intmax_t intmax_t;
4386typedef __uintmax_t uintmax_t;
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472typedef int __gwchar_t;
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544typedef struct
4545 {
4546 long int quot;
4547 long int rem;
4548 } imaxdiv_t;
4549extern intmax_t imaxabs (intmax_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
4550
4551
4552extern imaxdiv_t imaxdiv (intmax_t __numer, intmax_t __denom)
4553 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
4554
4555
4556extern intmax_t strtoimax (const char *__restrict __nptr,
4557 char **__restrict __endptr, int __base) __attribute__ ((__nothrow__ ));
4558
4559
4560extern uintmax_t strtoumax (const char *__restrict __nptr,
4561 char ** __restrict __endptr, int __base) __attribute__ ((__nothrow__ ));
4562
4563
4564extern intmax_t wcstoimax (const __gwchar_t *__restrict __nptr,
4565 __gwchar_t **__restrict __endptr, int __base)
4566 __attribute__ ((__nothrow__ ));
4567
4568
4569extern uintmax_t wcstoumax (const __gwchar_t *__restrict __nptr,
4570 __gwchar_t ** __restrict __endptr, int __base)
4571 __attribute__ ((__nothrow__ ));
4572
4573
4574
4575
4576
4577extern long int __strtol_internal (const char *__restrict __nptr,
4578 char **__restrict __endptr,
4579 int __base, int __group)
4580 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
4581
4582extern __inline __attribute__ ((__gnu_inline__)) intmax_t
4583__attribute__ ((__nothrow__ )) strtoimax (const char *__restrict nptr, char **__restrict endptr, int base)
4584
4585{
4586 return __strtol_internal (nptr, endptr, base, 0);
4587}
4588
4589extern unsigned long int __strtoul_internal (const char *__restrict __nptr,
4590 char ** __restrict __endptr,
4591 int __base, int __group)
4592 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
4593
4594extern __inline __attribute__ ((__gnu_inline__)) uintmax_t
4595__attribute__ ((__nothrow__ )) strtoumax (const char *__restrict nptr, char **__restrict endptr, int base)
4596
4597{
4598 return __strtoul_internal (nptr, endptr, base, 0);
4599}
4600
4601extern long int __wcstol_internal (const __gwchar_t * __restrict __nptr,
4602 __gwchar_t **__restrict __endptr,
4603 int __base, int __group)
4604 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
4605
4606extern __inline __attribute__ ((__gnu_inline__)) intmax_t
4607__attribute__ ((__nothrow__ )) wcstoimax (const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)
4608
4609{
4610 return __wcstol_internal (nptr, endptr, base, 0);
4611}
4612
4613extern unsigned long int __wcstoul_internal (const __gwchar_t *
4614 __restrict __nptr,
4615 __gwchar_t **
4616 __restrict __endptr,
4617 int __base, int __group)
4618 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
4619
4620extern __inline __attribute__ ((__gnu_inline__)) uintmax_t
4621__attribute__ ((__nothrow__ )) wcstoumax (const __gwchar_t *__restrict nptr, __gwchar_t **__restrict endptr, int base)
4622
4623{
4624 return __wcstoul_internal (nptr, endptr, base, 0);
4625}
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816typedef __socklen_t socklen_t;
4817
4818
4819
4820
4821
4822
4823
4824extern int access (const char *__name, int __type) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
4825
4826
4827
4828
4829extern int euidaccess (const char *__name, int __type)
4830 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
4831
4832
4833extern int eaccess (const char *__name, int __type)
4834 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
4835
4836
4837
4838
4839
4840
4841extern int faccessat (int __fd, const char *__file, int __type, int __flag)
4842 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
4843extern __off_t lseek (int __fd, __off_t __offset, int __whence) __attribute__ ((__nothrow__ ));
4844extern __off64_t lseek64 (int __fd, __off64_t __offset, int __whence)
4845 __attribute__ ((__nothrow__ ));
4846
4847
4848
4849
4850
4851
4852extern int close (int __fd);
4853
4854
4855
4856
4857
4858
4859extern ssize_t read (int __fd, void *__buf, size_t __nbytes) __attribute__ ((__warn_unused_result__));
4860
4861
4862
4863
4864
4865extern ssize_t write (int __fd, const void *__buf, size_t __n) __attribute__ ((__warn_unused_result__));
4866extern ssize_t pread (int __fd, void *__buf, size_t __nbytes,
4867 __off_t __offset) __attribute__ ((__warn_unused_result__));
4868
4869
4870
4871
4872
4873
4874extern ssize_t pwrite (int __fd, const void *__buf, size_t __n,
4875 __off_t __offset) __attribute__ ((__warn_unused_result__));
4876extern ssize_t pread64 (int __fd, void *__buf, size_t __nbytes,
4877 __off64_t __offset) __attribute__ ((__warn_unused_result__));
4878
4879
4880extern ssize_t pwrite64 (int __fd, const void *__buf, size_t __n,
4881 __off64_t __offset) __attribute__ ((__warn_unused_result__));
4882
4883
4884
4885
4886
4887
4888
4889extern int pipe (int __pipedes[2]) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
4890
4891
4892
4893
4894extern int pipe2 (int __pipedes[2], int __flags) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
4895extern unsigned int alarm (unsigned int __seconds) __attribute__ ((__nothrow__ ));
4896extern unsigned int sleep (unsigned int __seconds);
4897
4898
4899
4900
4901
4902
4903
4904extern __useconds_t ualarm (__useconds_t __value, __useconds_t __interval)
4905 __attribute__ ((__nothrow__ ));
4906
4907
4908
4909
4910
4911
4912extern int usleep (__useconds_t __useconds);
4913extern int pause (void);
4914
4915
4916
4917extern int chown (const char *__file, __uid_t __owner, __gid_t __group)
4918 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
4919
4920
4921
4922extern int fchown (int __fd, __uid_t __owner, __gid_t __group) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
4923
4924
4925
4926
4927extern int lchown (const char *__file, __uid_t __owner, __gid_t __group)
4928 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
4929
4930
4931
4932
4933
4934
4935extern int fchownat (int __fd, const char *__file, __uid_t __owner,
4936 __gid_t __group, int __flag)
4937 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
4938
4939
4940
4941extern int chdir (const char *__path) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
4942
4943
4944
4945extern int fchdir (int __fd) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
4946extern char *getcwd (char *__buf, size_t __size) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
4947
4948
4949
4950
4951
4952extern char *get_current_dir_name (void) __attribute__ ((__nothrow__ ));
4953
4954
4955
4956
4957
4958
4959
4960extern char *getwd (char *__buf)
4961 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__));
4962
4963
4964
4965
4966extern int dup (int __fd) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
4967
4968
4969extern int dup2 (int __fd, int __fd2) __attribute__ ((__nothrow__ ));
4970
4971
4972
4973
4974extern int dup3 (int __fd, int __fd2, int __flags) __attribute__ ((__nothrow__ ));
4975
4976
4977
4978extern char **__environ;
4979
4980extern char **environ;
4981
4982
4983
4984
4985
4986extern int execve (const char *__path, char *const __argv[],
4987 char *const __envp[]) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
4988
4989
4990
4991
4992extern int fexecve (int __fd, char *const __argv[], char *const __envp[])
4993 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
4994
4995
4996
4997
4998extern int execv (const char *__path, char *const __argv[])
4999 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
5000
5001
5002
5003extern int execle (const char *__path, const char *__arg, ...)
5004 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
5005
5006
5007
5008extern int execl (const char *__path, const char *__arg, ...)
5009 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
5010
5011
5012
5013extern int execvp (const char *__file, char *const __argv[])
5014 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
5015
5016
5017
5018
5019extern int execlp (const char *__file, const char *__arg, ...)
5020 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
5021
5022
5023
5024
5025extern int execvpe (const char *__file, char *const __argv[],
5026 char *const __envp[])
5027 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
5028
5029
5030
5031
5032
5033extern int nice (int __inc) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
5034
5035
5036
5037
5038extern void _exit (int __status) __attribute__ ((__noreturn__));
5039
5040
5041
5042
5043
5044
5045enum
5046 {
5047 _PC_LINK_MAX,
5048 _PC_MAX_CANON,
5049 _PC_MAX_INPUT,
5050 _PC_NAME_MAX,
5051 _PC_PATH_MAX,
5052 _PC_PIPE_BUF,
5053 _PC_CHOWN_RESTRICTED,
5054 _PC_NO_TRUNC,
5055 _PC_VDISABLE,
5056 _PC_SYNC_IO,
5057 _PC_ASYNC_IO,
5058 _PC_PRIO_IO,
5059 _PC_SOCK_MAXBUF,
5060 _PC_FILESIZEBITS,
5061 _PC_REC_INCR_XFER_SIZE,
5062 _PC_REC_MAX_XFER_SIZE,
5063 _PC_REC_MIN_XFER_SIZE,
5064 _PC_REC_XFER_ALIGN,
5065 _PC_ALLOC_SIZE_MIN,
5066 _PC_SYMLINK_MAX,
5067 _PC_2_SYMLINKS
5068 };
5069
5070
5071enum
5072 {
5073 _SC_ARG_MAX,
5074 _SC_CHILD_MAX,
5075 _SC_CLK_TCK,
5076 _SC_NGROUPS_MAX,
5077 _SC_OPEN_MAX,
5078 _SC_STREAM_MAX,
5079 _SC_TZNAME_MAX,
5080 _SC_JOB_CONTROL,
5081 _SC_SAVED_IDS,
5082 _SC_REALTIME_SIGNALS,
5083 _SC_PRIORITY_SCHEDULING,
5084 _SC_TIMERS,
5085 _SC_ASYNCHRONOUS_IO,
5086 _SC_PRIORITIZED_IO,
5087 _SC_SYNCHRONIZED_IO,
5088 _SC_FSYNC,
5089 _SC_MAPPED_FILES,
5090 _SC_MEMLOCK,
5091 _SC_MEMLOCK_RANGE,
5092 _SC_MEMORY_PROTECTION,
5093 _SC_MESSAGE_PASSING,
5094 _SC_SEMAPHORES,
5095 _SC_SHARED_MEMORY_OBJECTS,
5096 _SC_AIO_LISTIO_MAX,
5097 _SC_AIO_MAX,
5098 _SC_AIO_PRIO_DELTA_MAX,
5099 _SC_DELAYTIMER_MAX,
5100 _SC_MQ_OPEN_MAX,
5101 _SC_MQ_PRIO_MAX,
5102 _SC_VERSION,
5103 _SC_PAGESIZE,
5104 _SC_RTSIG_MAX,
5105 _SC_SEM_NSEMS_MAX,
5106 _SC_SEM_VALUE_MAX,
5107 _SC_SIGQUEUE_MAX,
5108 _SC_TIMER_MAX,
5109
5110
5111
5112 _SC_BC_BASE_MAX,
5113 _SC_BC_DIM_MAX,
5114 _SC_BC_SCALE_MAX,
5115 _SC_BC_STRING_MAX,
5116 _SC_COLL_WEIGHTS_MAX,
5117 _SC_EQUIV_CLASS_MAX,
5118 _SC_EXPR_NEST_MAX,
5119 _SC_LINE_MAX,
5120 _SC_RE_DUP_MAX,
5121 _SC_CHARCLASS_NAME_MAX,
5122
5123 _SC_2_VERSION,
5124 _SC_2_C_BIND,
5125 _SC_2_C_DEV,
5126 _SC_2_FORT_DEV,
5127 _SC_2_FORT_RUN,
5128 _SC_2_SW_DEV,
5129 _SC_2_LOCALEDEF,
5130
5131 _SC_PII,
5132 _SC_PII_XTI,
5133 _SC_PII_SOCKET,
5134 _SC_PII_INTERNET,
5135 _SC_PII_OSI,
5136 _SC_POLL,
5137 _SC_SELECT,
5138 _SC_UIO_MAXIOV,
5139 _SC_IOV_MAX = _SC_UIO_MAXIOV,
5140 _SC_PII_INTERNET_STREAM,
5141 _SC_PII_INTERNET_DGRAM,
5142 _SC_PII_OSI_COTS,
5143 _SC_PII_OSI_CLTS,
5144 _SC_PII_OSI_M,
5145 _SC_T_IOV_MAX,
5146
5147
5148 _SC_THREADS,
5149 _SC_THREAD_SAFE_FUNCTIONS,
5150 _SC_GETGR_R_SIZE_MAX,
5151 _SC_GETPW_R_SIZE_MAX,
5152 _SC_LOGIN_NAME_MAX,
5153 _SC_TTY_NAME_MAX,
5154 _SC_THREAD_DESTRUCTOR_ITERATIONS,
5155 _SC_THREAD_KEYS_MAX,
5156 _SC_THREAD_STACK_MIN,
5157 _SC_THREAD_THREADS_MAX,
5158 _SC_THREAD_ATTR_STACKADDR,
5159 _SC_THREAD_ATTR_STACKSIZE,
5160 _SC_THREAD_PRIORITY_SCHEDULING,
5161 _SC_THREAD_PRIO_INHERIT,
5162 _SC_THREAD_PRIO_PROTECT,
5163 _SC_THREAD_PROCESS_SHARED,
5164
5165 _SC_NPROCESSORS_CONF,
5166 _SC_NPROCESSORS_ONLN,
5167 _SC_PHYS_PAGES,
5168 _SC_AVPHYS_PAGES,
5169 _SC_ATEXIT_MAX,
5170 _SC_PASS_MAX,
5171
5172 _SC_XOPEN_VERSION,
5173 _SC_XOPEN_XCU_VERSION,
5174 _SC_XOPEN_UNIX,
5175 _SC_XOPEN_CRYPT,
5176 _SC_XOPEN_ENH_I18N,
5177 _SC_XOPEN_SHM,
5178
5179 _SC_2_CHAR_TERM,
5180 _SC_2_C_VERSION,
5181 _SC_2_UPE,
5182
5183 _SC_XOPEN_XPG2,
5184 _SC_XOPEN_XPG3,
5185 _SC_XOPEN_XPG4,
5186
5187 _SC_CHAR_BIT,
5188 _SC_CHAR_MAX,
5189 _SC_CHAR_MIN,
5190 _SC_INT_MAX,
5191 _SC_INT_MIN,
5192 _SC_LONG_BIT,
5193 _SC_WORD_BIT,
5194 _SC_MB_LEN_MAX,
5195 _SC_NZERO,
5196 _SC_SSIZE_MAX,
5197 _SC_SCHAR_MAX,
5198 _SC_SCHAR_MIN,
5199 _SC_SHRT_MAX,
5200 _SC_SHRT_MIN,
5201 _SC_UCHAR_MAX,
5202 _SC_UINT_MAX,
5203 _SC_ULONG_MAX,
5204 _SC_USHRT_MAX,
5205
5206 _SC_NL_ARGMAX,
5207 _SC_NL_LANGMAX,
5208 _SC_NL_MSGMAX,
5209 _SC_NL_NMAX,
5210 _SC_NL_SETMAX,
5211 _SC_NL_TEXTMAX,
5212
5213 _SC_XBS5_ILP32_OFF32,
5214 _SC_XBS5_ILP32_OFFBIG,
5215 _SC_XBS5_LP64_OFF64,
5216 _SC_XBS5_LPBIG_OFFBIG,
5217
5218 _SC_XOPEN_LEGACY,
5219 _SC_XOPEN_REALTIME,
5220 _SC_XOPEN_REALTIME_THREADS,
5221
5222 _SC_ADVISORY_INFO,
5223 _SC_BARRIERS,
5224 _SC_BASE,
5225 _SC_C_LANG_SUPPORT,
5226 _SC_C_LANG_SUPPORT_R,
5227 _SC_CLOCK_SELECTION,
5228 _SC_CPUTIME,
5229 _SC_THREAD_CPUTIME,
5230 _SC_DEVICE_IO,
5231 _SC_DEVICE_SPECIFIC,
5232 _SC_DEVICE_SPECIFIC_R,
5233 _SC_FD_MGMT,
5234 _SC_FIFO,
5235 _SC_PIPE,
5236 _SC_FILE_ATTRIBUTES,
5237 _SC_FILE_LOCKING,
5238 _SC_FILE_SYSTEM,
5239 _SC_MONOTONIC_CLOCK,
5240 _SC_MULTI_PROCESS,
5241 _SC_SINGLE_PROCESS,
5242 _SC_NETWORKING,
5243 _SC_READER_WRITER_LOCKS,
5244 _SC_SPIN_LOCKS,
5245 _SC_REGEXP,
5246 _SC_REGEX_VERSION,
5247 _SC_SHELL,
5248 _SC_SIGNALS,
5249 _SC_SPAWN,
5250 _SC_SPORADIC_SERVER,
5251 _SC_THREAD_SPORADIC_SERVER,
5252 _SC_SYSTEM_DATABASE,
5253 _SC_SYSTEM_DATABASE_R,
5254 _SC_TIMEOUTS,
5255 _SC_TYPED_MEMORY_OBJECTS,
5256 _SC_USER_GROUPS,
5257 _SC_USER_GROUPS_R,
5258 _SC_2_PBS,
5259 _SC_2_PBS_ACCOUNTING,
5260 _SC_2_PBS_LOCATE,
5261 _SC_2_PBS_MESSAGE,
5262 _SC_2_PBS_TRACK,
5263 _SC_SYMLOOP_MAX,
5264 _SC_STREAMS,
5265 _SC_2_PBS_CHECKPOINT,
5266
5267 _SC_V6_ILP32_OFF32,
5268 _SC_V6_ILP32_OFFBIG,
5269 _SC_V6_LP64_OFF64,
5270 _SC_V6_LPBIG_OFFBIG,
5271
5272 _SC_HOST_NAME_MAX,
5273 _SC_TRACE,
5274 _SC_TRACE_EVENT_FILTER,
5275 _SC_TRACE_INHERIT,
5276 _SC_TRACE_LOG,
5277
5278 _SC_LEVEL1_ICACHE_SIZE,
5279 _SC_LEVEL1_ICACHE_ASSOC,
5280 _SC_LEVEL1_ICACHE_LINESIZE,
5281 _SC_LEVEL1_DCACHE_SIZE,
5282 _SC_LEVEL1_DCACHE_ASSOC,
5283 _SC_LEVEL1_DCACHE_LINESIZE,
5284 _SC_LEVEL2_CACHE_SIZE,
5285 _SC_LEVEL2_CACHE_ASSOC,
5286 _SC_LEVEL2_CACHE_LINESIZE,
5287 _SC_LEVEL3_CACHE_SIZE,
5288 _SC_LEVEL3_CACHE_ASSOC,
5289 _SC_LEVEL3_CACHE_LINESIZE,
5290 _SC_LEVEL4_CACHE_SIZE,
5291 _SC_LEVEL4_CACHE_ASSOC,
5292 _SC_LEVEL4_CACHE_LINESIZE,
5293
5294
5295 _SC_IPV6 = _SC_LEVEL1_ICACHE_SIZE + 50,
5296 _SC_RAW_SOCKETS,
5297
5298 _SC_V7_ILP32_OFF32,
5299 _SC_V7_ILP32_OFFBIG,
5300 _SC_V7_LP64_OFF64,
5301 _SC_V7_LPBIG_OFFBIG,
5302
5303 _SC_SS_REPL_MAX,
5304
5305 _SC_TRACE_EVENT_NAME_MAX,
5306 _SC_TRACE_NAME_MAX,
5307 _SC_TRACE_SYS_MAX,
5308 _SC_TRACE_USER_EVENT_MAX,
5309
5310 _SC_XOPEN_STREAMS,
5311
5312 _SC_THREAD_ROBUST_PRIO_INHERIT,
5313 _SC_THREAD_ROBUST_PRIO_PROTECT
5314 };
5315
5316
5317enum
5318 {
5319 _CS_PATH,
5320
5321 _CS_V6_WIDTH_RESTRICTED_ENVS,
5322
5323 _CS_GNU_LIBC_VERSION,
5324 _CS_GNU_LIBPTHREAD_VERSION,
5325
5326 _CS_V5_WIDTH_RESTRICTED_ENVS,
5327
5328 _CS_V7_WIDTH_RESTRICTED_ENVS,
5329
5330 _CS_LFS_CFLAGS = 1000,
5331 _CS_LFS_LDFLAGS,
5332 _CS_LFS_LIBS,
5333 _CS_LFS_LINTFLAGS,
5334 _CS_LFS64_CFLAGS,
5335 _CS_LFS64_LDFLAGS,
5336 _CS_LFS64_LIBS,
5337 _CS_LFS64_LINTFLAGS,
5338
5339 _CS_XBS5_ILP32_OFF32_CFLAGS = 1100,
5340 _CS_XBS5_ILP32_OFF32_LDFLAGS,
5341 _CS_XBS5_ILP32_OFF32_LIBS,
5342 _CS_XBS5_ILP32_OFF32_LINTFLAGS,
5343 _CS_XBS5_ILP32_OFFBIG_CFLAGS,
5344 _CS_XBS5_ILP32_OFFBIG_LDFLAGS,
5345 _CS_XBS5_ILP32_OFFBIG_LIBS,
5346 _CS_XBS5_ILP32_OFFBIG_LINTFLAGS,
5347 _CS_XBS5_LP64_OFF64_CFLAGS,
5348 _CS_XBS5_LP64_OFF64_LDFLAGS,
5349 _CS_XBS5_LP64_OFF64_LIBS,
5350 _CS_XBS5_LP64_OFF64_LINTFLAGS,
5351 _CS_XBS5_LPBIG_OFFBIG_CFLAGS,
5352 _CS_XBS5_LPBIG_OFFBIG_LDFLAGS,
5353 _CS_XBS5_LPBIG_OFFBIG_LIBS,
5354 _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS,
5355
5356 _CS_POSIX_V6_ILP32_OFF32_CFLAGS,
5357 _CS_POSIX_V6_ILP32_OFF32_LDFLAGS,
5358 _CS_POSIX_V6_ILP32_OFF32_LIBS,
5359 _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS,
5360 _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS,
5361 _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS,
5362 _CS_POSIX_V6_ILP32_OFFBIG_LIBS,
5363 _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS,
5364 _CS_POSIX_V6_LP64_OFF64_CFLAGS,
5365 _CS_POSIX_V6_LP64_OFF64_LDFLAGS,
5366 _CS_POSIX_V6_LP64_OFF64_LIBS,
5367 _CS_POSIX_V6_LP64_OFF64_LINTFLAGS,
5368 _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS,
5369 _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS,
5370 _CS_POSIX_V6_LPBIG_OFFBIG_LIBS,
5371 _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS,
5372
5373 _CS_POSIX_V7_ILP32_OFF32_CFLAGS,
5374 _CS_POSIX_V7_ILP32_OFF32_LDFLAGS,
5375 _CS_POSIX_V7_ILP32_OFF32_LIBS,
5376 _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS,
5377 _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS,
5378 _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS,
5379 _CS_POSIX_V7_ILP32_OFFBIG_LIBS,
5380 _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS,
5381 _CS_POSIX_V7_LP64_OFF64_CFLAGS,
5382 _CS_POSIX_V7_LP64_OFF64_LDFLAGS,
5383 _CS_POSIX_V7_LP64_OFF64_LIBS,
5384 _CS_POSIX_V7_LP64_OFF64_LINTFLAGS,
5385 _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS,
5386 _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS,
5387 _CS_POSIX_V7_LPBIG_OFFBIG_LIBS,
5388 _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS,
5389
5390 _CS_V6_ENV,
5391 _CS_V7_ENV
5392 };
5393
5394
5395extern long int pathconf (const char *__path, int __name)
5396 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
5397
5398
5399extern long int fpathconf (int __fd, int __name) __attribute__ ((__nothrow__ ));
5400
5401
5402extern long int sysconf (int __name) __attribute__ ((__nothrow__ ));
5403
5404
5405
5406extern size_t confstr (int __name, char *__buf, size_t __len) __attribute__ ((__nothrow__ ));
5407
5408
5409
5410
5411extern __pid_t getpid (void) __attribute__ ((__nothrow__ ));
5412
5413
5414extern __pid_t getppid (void) __attribute__ ((__nothrow__ ));
5415
5416
5417extern __pid_t getpgrp (void) __attribute__ ((__nothrow__ ));
5418
5419
5420extern __pid_t __getpgid (__pid_t __pid) __attribute__ ((__nothrow__ ));
5421
5422extern __pid_t getpgid (__pid_t __pid) __attribute__ ((__nothrow__ ));
5423
5424
5425
5426
5427
5428
5429extern int setpgid (__pid_t __pid, __pid_t __pgid) __attribute__ ((__nothrow__ ));
5430extern int setpgrp (void) __attribute__ ((__nothrow__ ));
5431
5432
5433
5434
5435
5436
5437extern __pid_t setsid (void) __attribute__ ((__nothrow__ ));
5438
5439
5440
5441extern __pid_t getsid (__pid_t __pid) __attribute__ ((__nothrow__ ));
5442
5443
5444
5445extern __uid_t getuid (void) __attribute__ ((__nothrow__ ));
5446
5447
5448extern __uid_t geteuid (void) __attribute__ ((__nothrow__ ));
5449
5450
5451extern __gid_t getgid (void) __attribute__ ((__nothrow__ ));
5452
5453
5454extern __gid_t getegid (void) __attribute__ ((__nothrow__ ));
5455
5456
5457
5458
5459extern int getgroups (int __size, __gid_t __list[]) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
5460
5461
5462
5463extern int group_member (__gid_t __gid) __attribute__ ((__nothrow__ ));
5464
5465
5466
5467
5468
5469
5470extern int setuid (__uid_t __uid) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
5471
5472
5473
5474
5475extern int setreuid (__uid_t __ruid, __uid_t __euid) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
5476
5477
5478
5479
5480extern int seteuid (__uid_t __uid) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
5481
5482
5483
5484
5485
5486
5487extern int setgid (__gid_t __gid) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
5488
5489
5490
5491
5492extern int setregid (__gid_t __rgid, __gid_t __egid) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
5493
5494
5495
5496
5497extern int setegid (__gid_t __gid) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
5498
5499
5500
5501
5502
5503extern int getresuid (__uid_t *__ruid, __uid_t *__euid, __uid_t *__suid)
5504 __attribute__ ((__nothrow__ ));
5505
5506
5507
5508extern int getresgid (__gid_t *__rgid, __gid_t *__egid, __gid_t *__sgid)
5509 __attribute__ ((__nothrow__ ));
5510
5511
5512
5513extern int setresuid (__uid_t __ruid, __uid_t __euid, __uid_t __suid)
5514 __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
5515
5516
5517
5518extern int setresgid (__gid_t __rgid, __gid_t __egid, __gid_t __sgid)
5519 __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
5520
5521
5522
5523
5524
5525
5526extern __pid_t fork (void) __attribute__ ((__nothrow__));
5527
5528
5529
5530
5531
5532
5533
5534extern __pid_t vfork (void) __attribute__ ((__nothrow__ ));
5535
5536
5537
5538
5539
5540extern char *ttyname (int __fd) __attribute__ ((__nothrow__ ));
5541
5542
5543
5544extern int ttyname_r (int __fd, char *__buf, size_t __buflen)
5545 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2))) __attribute__ ((__warn_unused_result__));
5546
5547
5548
5549extern int isatty (int __fd) __attribute__ ((__nothrow__ ));
5550
5551
5552
5553
5554extern int ttyslot (void) __attribute__ ((__nothrow__ ));
5555
5556
5557
5558
5559extern int link (const char *__from, const char *__to)
5560 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
5561
5562
5563
5564
5565extern int linkat (int __fromfd, const char *__from, int __tofd,
5566 const char *__to, int __flags)
5567 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 4))) __attribute__ ((__warn_unused_result__));
5568
5569
5570
5571
5572extern int symlink (const char *__from, const char *__to)
5573 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
5574
5575
5576
5577
5578extern ssize_t readlink (const char *__restrict __path,
5579 char *__restrict __buf, size_t __len)
5580 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
5581
5582
5583
5584
5585extern int symlinkat (const char *__from, int __tofd,
5586 const char *__to) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3))) __attribute__ ((__warn_unused_result__));
5587
5588
5589extern ssize_t readlinkat (int __fd, const char *__restrict __path,
5590 char *__restrict __buf, size_t __len)
5591 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__));
5592
5593
5594
5595extern int unlink (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
5596
5597
5598
5599extern int unlinkat (int __fd, const char *__name, int __flag)
5600 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
5601
5602
5603
5604extern int rmdir (const char *__path) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
5605
5606
5607
5608extern __pid_t tcgetpgrp (int __fd) __attribute__ ((__nothrow__ ));
5609
5610
5611extern int tcsetpgrp (int __fd, __pid_t __pgrp_id) __attribute__ ((__nothrow__ ));
5612
5613
5614
5615
5616
5617
5618extern char *getlogin (void);
5619
5620
5621
5622
5623
5624
5625
5626extern int getlogin_r (char *__name, size_t __name_len) __attribute__ ((__nonnull__ (1)));
5627
5628
5629
5630
5631extern int setlogin (const char *__name) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646extern char *optarg;
5647extern int optind;
5648
5649
5650
5651
5652extern int opterr;
5653
5654
5655
5656extern int optopt;
5657extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
5658 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));
5659
5660
5661
5662
5663
5664
5665
5666extern int gethostname (char *__name, size_t __len) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
5667
5668
5669
5670
5671
5672
5673extern int sethostname (const char *__name, size_t __len)
5674 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
5675
5676
5677
5678extern int sethostid (long int __id) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
5679
5680
5681
5682
5683
5684extern int getdomainname (char *__name, size_t __len)
5685 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
5686extern int setdomainname (const char *__name, size_t __len)
5687 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
5688
5689
5690
5691
5692
5693extern int vhangup (void) __attribute__ ((__nothrow__ ));
5694
5695
5696extern int revoke (const char *__file) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
5697
5698
5699
5700
5701
5702
5703
5704extern int profil (unsigned short int *__sample_buffer, size_t __size,
5705 size_t __offset, unsigned int __scale)
5706 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
5707
5708
5709
5710
5711
5712extern int acct (const char *__name) __attribute__ ((__nothrow__ ));
5713
5714
5715
5716extern char *getusershell (void) __attribute__ ((__nothrow__ ));
5717extern void endusershell (void) __attribute__ ((__nothrow__ ));
5718extern void setusershell (void) __attribute__ ((__nothrow__ ));
5719
5720
5721
5722
5723
5724extern int daemon (int __nochdir, int __noclose) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
5725
5726
5727
5728
5729
5730
5731extern int chroot (const char *__path) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
5732
5733
5734
5735extern char *getpass (const char *__prompt) __attribute__ ((__nonnull__ (1)));
5736
5737
5738
5739
5740
5741
5742
5743extern int fsync (int __fd);
5744
5745
5746
5747
5748
5749extern int syncfs (int __fd) __attribute__ ((__nothrow__ ));
5750
5751
5752
5753
5754
5755
5756extern long int gethostid (void);
5757
5758
5759extern void sync (void) __attribute__ ((__nothrow__ ));
5760
5761
5762
5763
5764
5765extern int getpagesize (void) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
5766
5767
5768
5769
5770extern int getdtablesize (void) __attribute__ ((__nothrow__ ));
5771extern int truncate (const char *__file, __off_t __length)
5772 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
5773extern int truncate64 (const char *__file, __off64_t __length)
5774 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
5775extern int ftruncate (int __fd, __off_t __length) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
5776extern int ftruncate64 (int __fd, __off64_t __length) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
5777extern int brk (void *__addr) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
5778
5779
5780
5781
5782
5783extern void *sbrk (intptr_t __delta) __attribute__ ((__nothrow__ ));
5784extern long int syscall (long int __sysno, ...) __attribute__ ((__nothrow__ ));
5785
5786
5787extern int lockf (int __fd, int __cmd, __off_t __len) __attribute__ ((__warn_unused_result__));
5788extern int lockf64 (int __fd, int __cmd, __off64_t __len) __attribute__ ((__warn_unused_result__));
5789
5790
5791
5792
5793
5794
5795
5796ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
5797 int __outfd, __off64_t *__poutoff,
5798 size_t __length, unsigned int __flags);
5799
5800
5801
5802
5803
5804extern int fdatasync (int __fildes);
5805extern char *crypt (const char *__key, const char *__salt)
5806 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
5807
5808
5809
5810
5811
5812
5813
5814extern void swab (const void *__restrict __from, void *__restrict __to,
5815 ssize_t __n) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
5816int getentropy (void *__buffer, size_t __length) __attribute__ ((__warn_unused_result__));
5817
5818
5819
5820
5821
5822extern ssize_t __read_chk (int __fd, void *__buf, size_t __nbytes,
5823 size_t __buflen) __attribute__ ((__warn_unused_result__));
5824extern ssize_t __read_alias (int __fd, void *__buf, size_t __nbytes) __asm__ ("" "read") __attribute__ ((__warn_unused_result__));
5825
5826extern ssize_t __read_chk_warn (int __fd, void *__buf, size_t __nbytes, size_t __buflen) __asm__ ("" "__read_chk")
5827
5828
5829 __attribute__ ((__warn_unused_result__)) ;
5830
5831
5832extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__warn_unused_result__)) ssize_t
5833read (int __fd, void *__buf, size_t __nbytes)
5834{
5835 if (__builtin_object_size (__buf, 0) != (size_t) -1)
5836 {
5837 if (!__builtin_constant_p (__nbytes))
5838 return __read_chk (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0));
5839
5840 if (__nbytes > __builtin_object_size (__buf, 0))
5841 return __read_chk_warn (__fd, __buf, __nbytes, __builtin_object_size (__buf, 0));
5842 }
5843 return __read_alias (__fd, __buf, __nbytes);
5844}
5845
5846
5847extern ssize_t __pread_chk (int __fd, void *__buf, size_t __nbytes,
5848 __off_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__));
5849extern ssize_t __pread64_chk (int __fd, void *__buf, size_t __nbytes,
5850 __off64_t __offset, size_t __bufsize) __attribute__ ((__warn_unused_result__));
5851extern ssize_t __pread_alias (int __fd, void *__buf, size_t __nbytes, __off_t __offset) __asm__ ("" "pread") __attribute__ ((__warn_unused_result__));
5852
5853
5854extern ssize_t __pread64_alias (int __fd, void *__buf, size_t __nbytes, __off64_t __offset) __asm__ ("" "pread64") __attribute__ ((__warn_unused_result__));
5855
5856
5857extern ssize_t __pread_chk_warn (int __fd, void *__buf, size_t __nbytes, __off_t __offset, size_t __bufsize) __asm__ ("" "__pread_chk")
5858
5859
5860 __attribute__ ((__warn_unused_result__)) ;
5861
5862extern ssize_t __pread64_chk_warn (int __fd, void *__buf, size_t __nbytes, __off64_t __offset, size_t __bufsize) __asm__ ("" "__pread64_chk")
5863
5864
5865
5866 __attribute__ ((__warn_unused_result__)) ;
5867
5868
5869
5870extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__warn_unused_result__)) ssize_t
5871pread (int __fd, void *__buf, size_t __nbytes, __off_t __offset)
5872{
5873 if (__builtin_object_size (__buf, 0) != (size_t) -1)
5874 {
5875 if (!__builtin_constant_p (__nbytes))
5876 return __pread_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0));
5877
5878 if ( __nbytes > __builtin_object_size (__buf, 0))
5879 return __pread_chk_warn (__fd, __buf, __nbytes, __offset,
5880 __builtin_object_size (__buf, 0));
5881 }
5882 return __pread_alias (__fd, __buf, __nbytes, __offset);
5883}
5884extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__warn_unused_result__)) ssize_t
5885pread64 (int __fd, void *__buf, size_t __nbytes, __off64_t __offset)
5886{
5887 if (__builtin_object_size (__buf, 0) != (size_t) -1)
5888 {
5889 if (!__builtin_constant_p (__nbytes))
5890 return __pread64_chk (__fd, __buf, __nbytes, __offset, __builtin_object_size (__buf, 0));
5891
5892 if ( __nbytes > __builtin_object_size (__buf, 0))
5893 return __pread64_chk_warn (__fd, __buf, __nbytes, __offset,
5894 __builtin_object_size (__buf, 0));
5895 }
5896
5897 return __pread64_alias (__fd, __buf, __nbytes, __offset);
5898}
5899
5900
5901
5902
5903extern ssize_t __readlink_chk (const char *__restrict __path,
5904 char *__restrict __buf, size_t __len,
5905 size_t __buflen)
5906 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
5907extern ssize_t __readlink_alias (const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlink") __attribute__ ((__nothrow__ ))
5908
5909
5910 __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__));
5911extern ssize_t __readlink_chk_warn (const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlink_chk") __attribute__ ((__nothrow__ ))
5912
5913
5914
5915 __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ;
5916
5917
5918extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__warn_unused_result__)) ssize_t
5919__attribute__ ((__nothrow__ )) readlink (const char *__restrict __path, char *__restrict __buf, size_t __len)
5920
5921{
5922 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
5923 {
5924 if (!__builtin_constant_p (__len))
5925 return __readlink_chk (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
5926
5927 if ( __len > __builtin_object_size (__buf, 2 > 1))
5928 return __readlink_chk_warn (__path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
5929 }
5930 return __readlink_alias (__path, __buf, __len);
5931}
5932
5933
5934
5935extern ssize_t __readlinkat_chk (int __fd, const char *__restrict __path,
5936 char *__restrict __buf, size_t __len,
5937 size_t __buflen)
5938 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__));
5939extern ssize_t __readlinkat_alias (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len) __asm__ ("" "readlinkat") __attribute__ ((__nothrow__ ))
5940
5941
5942
5943 __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__));
5944extern ssize_t __readlinkat_chk_warn (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len, size_t __buflen) __asm__ ("" "__readlinkat_chk") __attribute__ ((__nothrow__ ))
5945
5946
5947
5948 __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ;
5949
5950
5951
5952extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__nonnull__ (2, 3))) __attribute__ ((__warn_unused_result__)) ssize_t
5953__attribute__ ((__nothrow__ )) readlinkat (int __fd, const char *__restrict __path, char *__restrict __buf, size_t __len)
5954
5955{
5956 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
5957 {
5958 if (!__builtin_constant_p (__len))
5959 return __readlinkat_chk (__fd, __path, __buf, __len, __builtin_object_size (__buf, 2 > 1));
5960
5961 if (__len > __builtin_object_size (__buf, 2 > 1))
5962 return __readlinkat_chk_warn (__fd, __path, __buf, __len,
5963 __builtin_object_size (__buf, 2 > 1));
5964 }
5965 return __readlinkat_alias (__fd, __path, __buf, __len);
5966}
5967
5968
5969extern char *__getcwd_chk (char *__buf, size_t __size, size_t __buflen)
5970 __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
5971extern char *__getcwd_alias (char *__buf, size_t __size) __asm__ ("" "getcwd") __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
5972
5973extern char *__getcwd_chk_warn (char *__buf, size_t __size, size_t __buflen) __asm__ ("" "__getcwd_chk") __attribute__ ((__nothrow__ ))
5974
5975
5976 __attribute__ ((__warn_unused_result__)) ;
5977
5978
5979extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__warn_unused_result__)) char *
5980__attribute__ ((__nothrow__ )) getcwd (char *__buf, size_t __size)
5981{
5982 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
5983 {
5984 if (!__builtin_constant_p (__size))
5985 return __getcwd_chk (__buf, __size, __builtin_object_size (__buf, 2 > 1));
5986
5987 if (__size > __builtin_object_size (__buf, 2 > 1))
5988 return __getcwd_chk_warn (__buf, __size, __builtin_object_size (__buf, 2 > 1));
5989 }
5990 return __getcwd_alias (__buf, __size);
5991}
5992
5993
5994extern char *__getwd_chk (char *__buf, size_t buflen)
5995 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
5996extern char *__getwd_warn (char *__buf) __asm__ ("" "getwd") __attribute__ ((__nothrow__ ))
5997 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) ;
5998
5999
6000extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__)) __attribute__ ((__warn_unused_result__)) char *
6001__attribute__ ((__nothrow__ )) getwd (char *__buf)
6002{
6003 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
6004 return __getwd_chk (__buf, __builtin_object_size (__buf, 2 > 1));
6005 return __getwd_warn (__buf);
6006}
6007
6008
6009extern size_t __confstr_chk (int __name, char *__buf, size_t __len,
6010 size_t __buflen) __attribute__ ((__nothrow__ ));
6011extern size_t __confstr_alias (int __name, char *__buf, size_t __len) __asm__ ("" "confstr") __attribute__ ((__nothrow__ ));
6012
6013extern size_t __confstr_chk_warn (int __name, char *__buf, size_t __len, size_t __buflen) __asm__ ("" "__confstr_chk") __attribute__ ((__nothrow__ ))
6014
6015
6016
6017 ;
6018
6019extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) size_t
6020__attribute__ ((__nothrow__ )) confstr (int __name, char *__buf, size_t __len)
6021{
6022 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
6023 {
6024 if (!__builtin_constant_p (__len))
6025 return __confstr_chk (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1));
6026
6027 if (__builtin_object_size (__buf, 2 > 1) < __len)
6028 return __confstr_chk_warn (__name, __buf, __len, __builtin_object_size (__buf, 2 > 1));
6029 }
6030 return __confstr_alias (__name, __buf, __len);
6031}
6032
6033
6034extern int __getgroups_chk (int __size, __gid_t __list[], size_t __listlen)
6035 __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
6036extern int __getgroups_alias (int __size, __gid_t __list[]) __asm__ ("" "getgroups") __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
6037
6038extern int __getgroups_chk_warn (int __size, __gid_t __list[], size_t __listlen) __asm__ ("" "__getgroups_chk") __attribute__ ((__nothrow__ ))
6039
6040
6041 __attribute__ ((__warn_unused_result__)) ;
6042
6043
6044extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) int
6045__attribute__ ((__nothrow__ )) getgroups (int __size, __gid_t __list[])
6046{
6047 if (__builtin_object_size (__list, 2 > 1) != (size_t) -1)
6048 {
6049 if (!__builtin_constant_p (__size) || __size < 0)
6050 return __getgroups_chk (__size, __list, __builtin_object_size (__list, 2 > 1));
6051
6052 if (__size * sizeof (__gid_t) > __builtin_object_size (__list, 2 > 1))
6053 return __getgroups_chk_warn (__size, __list, __builtin_object_size (__list, 2 > 1));
6054 }
6055 return __getgroups_alias (__size, __list);
6056}
6057
6058
6059extern int __ttyname_r_chk (int __fd, char *__buf, size_t __buflen,
6060 size_t __nreal) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
6061extern int __ttyname_r_alias (int __fd, char *__buf, size_t __buflen) __asm__ ("" "ttyname_r") __attribute__ ((__nothrow__ ))
6062
6063 __attribute__ ((__nonnull__ (2)));
6064extern int __ttyname_r_chk_warn (int __fd, char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__ttyname_r_chk") __attribute__ ((__nothrow__ ))
6065
6066
6067 __attribute__ ((__nonnull__ (2))) ;
6068
6069
6070extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) int
6071__attribute__ ((__nothrow__ )) ttyname_r (int __fd, char *__buf, size_t __buflen)
6072{
6073 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
6074 {
6075 if (!__builtin_constant_p (__buflen))
6076 return __ttyname_r_chk (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
6077
6078 if (__buflen > __builtin_object_size (__buf, 2 > 1))
6079 return __ttyname_r_chk_warn (__fd, __buf, __buflen, __builtin_object_size (__buf, 2 > 1));
6080 }
6081 return __ttyname_r_alias (__fd, __buf, __buflen);
6082}
6083
6084
6085
6086extern int __getlogin_r_chk (char *__buf, size_t __buflen, size_t __nreal)
6087 __attribute__ ((__nonnull__ (1)));
6088extern int __getlogin_r_alias (char *__buf, size_t __buflen) __asm__ ("" "getlogin_r") __attribute__ ((__nonnull__ (1)));
6089
6090extern int __getlogin_r_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getlogin_r_chk")
6091
6092
6093 __attribute__ ((__nonnull__ (1))) ;
6094
6095
6096extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) int
6097getlogin_r (char *__buf, size_t __buflen)
6098{
6099 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
6100 {
6101 if (!__builtin_constant_p (__buflen))
6102 return __getlogin_r_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
6103
6104 if (__buflen > __builtin_object_size (__buf, 2 > 1))
6105 return __getlogin_r_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
6106 }
6107 return __getlogin_r_alias (__buf, __buflen);
6108}
6109
6110
6111
6112
6113extern int __gethostname_chk (char *__buf, size_t __buflen, size_t __nreal)
6114 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
6115extern int __gethostname_alias (char *__buf, size_t __buflen) __asm__ ("" "gethostname") __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
6116
6117extern int __gethostname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__gethostname_chk") __attribute__ ((__nothrow__ ))
6118
6119
6120 __attribute__ ((__nonnull__ (1))) ;
6121
6122
6123extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) int
6124__attribute__ ((__nothrow__ )) gethostname (char *__buf, size_t __buflen)
6125{
6126 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
6127 {
6128 if (!__builtin_constant_p (__buflen))
6129 return __gethostname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
6130
6131 if (__buflen > __builtin_object_size (__buf, 2 > 1))
6132 return __gethostname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
6133 }
6134 return __gethostname_alias (__buf, __buflen);
6135}
6136
6137
6138
6139
6140extern int __getdomainname_chk (char *__buf, size_t __buflen, size_t __nreal)
6141 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
6142extern int __getdomainname_alias (char *__buf, size_t __buflen) __asm__ ("" "getdomainname") __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__));
6143
6144
6145extern int __getdomainname_chk_warn (char *__buf, size_t __buflen, size_t __nreal) __asm__ ("" "__getdomainname_chk") __attribute__ ((__nothrow__ ))
6146
6147
6148 __attribute__ ((__nonnull__ (1))) __attribute__ ((__warn_unused_result__)) ;
6149
6150
6151
6152extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) int
6153__attribute__ ((__nothrow__ )) getdomainname (char *__buf, size_t __buflen)
6154{
6155 if (__builtin_object_size (__buf, 2 > 1) != (size_t) -1)
6156 {
6157 if (!__builtin_constant_p (__buflen))
6158 return __getdomainname_chk (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
6159
6160 if (__buflen > __builtin_object_size (__buf, 2 > 1))
6161 return __getdomainname_chk_warn (__buf, __buflen, __builtin_object_size (__buf, 2 > 1));
6162 }
6163 return __getdomainname_alias (__buf, __buflen);
6164}
6165
6166
6167
6168extern __pid_t gettid (void) __attribute__ ((__nothrow__ ));
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236__attribute__((__warn_unused_result__))
6237__attribute__((__malloc__))
6238__attribute__((__returns_nonnull__))
6239__attribute__((__alloc_size__ (1)))
6240void *ruby_xmalloc(size_t size)
6241
6242;
6243
6244__attribute__((__warn_unused_result__))
6245__attribute__((__malloc__))
6246__attribute__((__returns_nonnull__))
6247__attribute__((__alloc_size__ (1,2)))
6248void *ruby_xmalloc2(size_t nelems, size_t elemsiz)
6249
6250;
6251
6252__attribute__((__warn_unused_result__))
6253__attribute__((__malloc__))
6254__attribute__((__returns_nonnull__))
6255__attribute__((__alloc_size__ (1,2)))
6256void *ruby_xcalloc(size_t nelems, size_t elemsiz)
6257
6258;
6259
6260__attribute__((__warn_unused_result__))
6261__attribute__((__returns_nonnull__))
6262__attribute__((__alloc_size__ (2)))
6263void *ruby_xrealloc(void *ptr, size_t newsiz)
6264
6265;
6266
6267__attribute__((__warn_unused_result__))
6268__attribute__((__returns_nonnull__))
6269__attribute__((__alloc_size__ (2,3)))
6270void *ruby_xrealloc2(void *ptr, size_t newelems, size_t newsiz)
6271
6272;
6273
6274void ruby_xfree(void *ptr)
6275
6276;
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294#define RBIMPL_ATTR_COLD_H
6295#define RBIMPL_ATTR_COLD() __attribute__((__cold__))
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330__declspec(noreturn)
6331__attribute__((__cold__))
6332void rb_assert_failure(const char *file, int line, const char *name, const char *expr);
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377#define COLDFUNC RBIMPL_ATTR_COLD()
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522typedef float float_t;
6523typedef double double_t;
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539enum
6540 {
6541 FP_INT_UPWARD =
6542 0,
6543 FP_INT_DOWNWARD =
6544 1,
6545 FP_INT_TOWARDZERO =
6546 2,
6547 FP_INT_TONEARESTFROMZERO =
6548 3,
6549 FP_INT_TONEAREST =
6550 4,
6551 };
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575extern int __fpclassify (double __value) __attribute__ ((__nothrow__ ))
6576 __attribute__ ((__const__));
6577
6578
6579extern int __signbit (double __value) __attribute__ ((__nothrow__ ))
6580 __attribute__ ((__const__));
6581
6582
6583
6584extern int __isinf (double __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6585
6586
6587extern int __finite (double __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6588
6589
6590extern int __isnan (double __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6591
6592
6593extern int __iseqsig (double __x, double __y) __attribute__ ((__nothrow__ ));
6594
6595
6596extern int __issignaling (double __value) __attribute__ ((__nothrow__ ))
6597 __attribute__ ((__const__));
6598extern double acos (double __x) __attribute__ ((__nothrow__ )); extern double __acos (double __x) __attribute__ ((__nothrow__ ));
6599
6600extern double asin (double __x) __attribute__ ((__nothrow__ )); extern double __asin (double __x) __attribute__ ((__nothrow__ ));
6601
6602extern double atan (double __x) __attribute__ ((__nothrow__ )); extern double __atan (double __x) __attribute__ ((__nothrow__ ));
6603
6604extern double atan2 (double __y, double __x) __attribute__ ((__nothrow__ )); extern double __atan2 (double __y, double __x) __attribute__ ((__nothrow__ ));
6605
6606
6607 extern double cos (double __x) __attribute__ ((__nothrow__ )); extern double __cos (double __x) __attribute__ ((__nothrow__ ));
6608
6609 extern double sin (double __x) __attribute__ ((__nothrow__ )); extern double __sin (double __x) __attribute__ ((__nothrow__ ));
6610
6611extern double tan (double __x) __attribute__ ((__nothrow__ )); extern double __tan (double __x) __attribute__ ((__nothrow__ ));
6612
6613
6614
6615
6616extern double cosh (double __x) __attribute__ ((__nothrow__ )); extern double __cosh (double __x) __attribute__ ((__nothrow__ ));
6617
6618extern double sinh (double __x) __attribute__ ((__nothrow__ )); extern double __sinh (double __x) __attribute__ ((__nothrow__ ));
6619
6620extern double tanh (double __x) __attribute__ ((__nothrow__ )); extern double __tanh (double __x) __attribute__ ((__nothrow__ ));
6621
6622
6623
6624 extern void sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__ )); extern void __sincos (double __x, double *__sinx, double *__cosx) __attribute__ ((__nothrow__ ));
6625
6626
6627
6628
6629
6630extern double acosh (double __x) __attribute__ ((__nothrow__ )); extern double __acosh (double __x) __attribute__ ((__nothrow__ ));
6631
6632extern double asinh (double __x) __attribute__ ((__nothrow__ )); extern double __asinh (double __x) __attribute__ ((__nothrow__ ));
6633
6634extern double atanh (double __x) __attribute__ ((__nothrow__ )); extern double __atanh (double __x) __attribute__ ((__nothrow__ ));
6635
6636
6637
6638
6639
6640 extern double exp (double __x) __attribute__ ((__nothrow__ )); extern double __exp (double __x) __attribute__ ((__nothrow__ ));
6641
6642
6643extern double frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ )); extern double __frexp (double __x, int *__exponent) __attribute__ ((__nothrow__ ));
6644
6645
6646extern double ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ )); extern double __ldexp (double __x, int __exponent) __attribute__ ((__nothrow__ ));
6647
6648
6649 extern double log (double __x) __attribute__ ((__nothrow__ )); extern double __log (double __x) __attribute__ ((__nothrow__ ));
6650
6651
6652extern double log10 (double __x) __attribute__ ((__nothrow__ )); extern double __log10 (double __x) __attribute__ ((__nothrow__ ));
6653
6654
6655extern double modf (double __x, double *__iptr) __attribute__ ((__nothrow__ )); extern double __modf (double __x, double *__iptr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
6656
6657
6658
6659extern double exp10 (double __x) __attribute__ ((__nothrow__ )); extern double __exp10 (double __x) __attribute__ ((__nothrow__ ));
6660
6661
6662
6663
6664extern double expm1 (double __x) __attribute__ ((__nothrow__ )); extern double __expm1 (double __x) __attribute__ ((__nothrow__ ));
6665
6666
6667extern double log1p (double __x) __attribute__ ((__nothrow__ )); extern double __log1p (double __x) __attribute__ ((__nothrow__ ));
6668
6669
6670extern double logb (double __x) __attribute__ ((__nothrow__ )); extern double __logb (double __x) __attribute__ ((__nothrow__ ));
6671
6672
6673
6674
6675extern double exp2 (double __x) __attribute__ ((__nothrow__ )); extern double __exp2 (double __x) __attribute__ ((__nothrow__ ));
6676
6677
6678extern double log2 (double __x) __attribute__ ((__nothrow__ )); extern double __log2 (double __x) __attribute__ ((__nothrow__ ));
6679
6680
6681
6682
6683
6684
6685 extern double pow (double __x, double __y) __attribute__ ((__nothrow__ )); extern double __pow (double __x, double __y) __attribute__ ((__nothrow__ ));
6686
6687
6688extern double sqrt (double __x) __attribute__ ((__nothrow__ )); extern double __sqrt (double __x) __attribute__ ((__nothrow__ ));
6689
6690
6691
6692extern double hypot (double __x, double __y) __attribute__ ((__nothrow__ )); extern double __hypot (double __x, double __y) __attribute__ ((__nothrow__ ));
6693
6694
6695
6696
6697extern double cbrt (double __x) __attribute__ ((__nothrow__ )); extern double __cbrt (double __x) __attribute__ ((__nothrow__ ));
6698
6699
6700
6701
6702
6703
6704extern double ceil (double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern double __ceil (double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6705
6706
6707extern double fabs (double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern double __fabs (double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6708
6709
6710extern double floor (double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern double __floor (double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6711
6712
6713extern double fmod (double __x, double __y) __attribute__ ((__nothrow__ )); extern double __fmod (double __x, double __y) __attribute__ ((__nothrow__ ));
6714extern int isinf (double __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6715
6716
6717
6718
6719extern int finite (double __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6720
6721
6722extern double drem (double __x, double __y) __attribute__ ((__nothrow__ )); extern double __drem (double __x, double __y) __attribute__ ((__nothrow__ ));
6723
6724
6725
6726extern double significand (double __x) __attribute__ ((__nothrow__ )); extern double __significand (double __x) __attribute__ ((__nothrow__ ));
6727
6728
6729
6730
6731
6732
6733extern double copysign (double __x, double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern double __copysign (double __x, double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6734
6735
6736
6737
6738extern double nan (const char *__tagb) __attribute__ ((__nothrow__ )); extern double __nan (const char *__tagb) __attribute__ ((__nothrow__ ));
6739extern int isnan (double __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6740
6741
6742
6743
6744
6745extern double j0 (double) __attribute__ ((__nothrow__ )); extern double __j0 (double) __attribute__ ((__nothrow__ ));
6746extern double j1 (double) __attribute__ ((__nothrow__ )); extern double __j1 (double) __attribute__ ((__nothrow__ ));
6747extern double jn (int, double) __attribute__ ((__nothrow__ )); extern double __jn (int, double) __attribute__ ((__nothrow__ ));
6748extern double y0 (double) __attribute__ ((__nothrow__ )); extern double __y0 (double) __attribute__ ((__nothrow__ ));
6749extern double y1 (double) __attribute__ ((__nothrow__ )); extern double __y1 (double) __attribute__ ((__nothrow__ ));
6750extern double yn (int, double) __attribute__ ((__nothrow__ )); extern double __yn (int, double) __attribute__ ((__nothrow__ ));
6751
6752
6753
6754
6755
6756extern double erf (double) __attribute__ ((__nothrow__ )); extern double __erf (double) __attribute__ ((__nothrow__ ));
6757extern double erfc (double) __attribute__ ((__nothrow__ )); extern double __erfc (double) __attribute__ ((__nothrow__ ));
6758extern double lgamma (double) __attribute__ ((__nothrow__ )); extern double __lgamma (double) __attribute__ ((__nothrow__ ));
6759
6760
6761
6762
6763extern double tgamma (double) __attribute__ ((__nothrow__ )); extern double __tgamma (double) __attribute__ ((__nothrow__ ));
6764
6765
6766
6767
6768
6769extern double gamma (double) __attribute__ ((__nothrow__ )); extern double __gamma (double) __attribute__ ((__nothrow__ ));
6770
6771
6772
6773
6774
6775
6776
6777extern double lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ )); extern double __lgamma_r (double, int *__signgamp) __attribute__ ((__nothrow__ ));
6778
6779
6780
6781
6782
6783
6784extern double rint (double __x) __attribute__ ((__nothrow__ )); extern double __rint (double __x) __attribute__ ((__nothrow__ ));
6785
6786
6787extern double nextafter (double __x, double __y) __attribute__ ((__nothrow__ )); extern double __nextafter (double __x, double __y) __attribute__ ((__nothrow__ ));
6788
6789extern double nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ )); extern double __nexttoward (double __x, long double __y) __attribute__ ((__nothrow__ ));
6790
6791
6792
6793
6794extern double nextdown (double __x) __attribute__ ((__nothrow__ )); extern double __nextdown (double __x) __attribute__ ((__nothrow__ ));
6795
6796extern double nextup (double __x) __attribute__ ((__nothrow__ )); extern double __nextup (double __x) __attribute__ ((__nothrow__ ));
6797
6798
6799
6800extern double remainder (double __x, double __y) __attribute__ ((__nothrow__ )); extern double __remainder (double __x, double __y) __attribute__ ((__nothrow__ ));
6801
6802
6803
6804extern double scalbn (double __x, int __n) __attribute__ ((__nothrow__ )); extern double __scalbn (double __x, int __n) __attribute__ ((__nothrow__ ));
6805
6806
6807
6808extern int ilogb (double __x) __attribute__ ((__nothrow__ )); extern int __ilogb (double __x) __attribute__ ((__nothrow__ ));
6809
6810
6811
6812
6813extern long int llogb (double __x) __attribute__ ((__nothrow__ )); extern long int __llogb (double __x) __attribute__ ((__nothrow__ ));
6814
6815
6816
6817
6818extern double scalbln (double __x, long int __n) __attribute__ ((__nothrow__ )); extern double __scalbln (double __x, long int __n) __attribute__ ((__nothrow__ ));
6819
6820
6821
6822extern double nearbyint (double __x) __attribute__ ((__nothrow__ )); extern double __nearbyint (double __x) __attribute__ ((__nothrow__ ));
6823
6824
6825
6826extern double round (double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern double __round (double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6827
6828
6829
6830extern double trunc (double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern double __trunc (double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6831
6832
6833
6834
6835extern double remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ )); extern double __remquo (double __x, double __y, int *__quo) __attribute__ ((__nothrow__ ));
6836
6837
6838
6839
6840
6841
6842extern long int lrint (double __x) __attribute__ ((__nothrow__ )); extern long int __lrint (double __x) __attribute__ ((__nothrow__ ));
6843__extension__
6844extern long long int llrint (double __x) __attribute__ ((__nothrow__ )); extern long long int __llrint (double __x) __attribute__ ((__nothrow__ ));
6845
6846
6847
6848extern long int lround (double __x) __attribute__ ((__nothrow__ )); extern long int __lround (double __x) __attribute__ ((__nothrow__ ));
6849__extension__
6850extern long long int llround (double __x) __attribute__ ((__nothrow__ )); extern long long int __llround (double __x) __attribute__ ((__nothrow__ ));
6851
6852
6853
6854extern double fdim (double __x, double __y) __attribute__ ((__nothrow__ )); extern double __fdim (double __x, double __y) __attribute__ ((__nothrow__ ));
6855
6856
6857extern double fmax (double __x, double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern double __fmax (double __x, double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6858
6859
6860extern double fmin (double __x, double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern double __fmin (double __x, double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6861
6862
6863extern double fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ )); extern double __fma (double __x, double __y, double __z) __attribute__ ((__nothrow__ ));
6864
6865
6866
6867
6868extern double roundeven (double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern double __roundeven (double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6869
6870
6871
6872extern __intmax_t fromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __intmax_t __fromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
6873
6874
6875
6876
6877extern __uintmax_t ufromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __uintmax_t __ufromfp (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
6878
6879
6880
6881
6882
6883extern __intmax_t fromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __intmax_t __fromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
6884
6885
6886
6887
6888
6889extern __uintmax_t ufromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __uintmax_t __ufromfpx (double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
6890
6891
6892
6893extern double fmaxmag (double __x, double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern double __fmaxmag (double __x, double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6894
6895
6896extern double fminmag (double __x, double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern double __fminmag (double __x, double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6897
6898
6899extern int canonicalize (double *__cx, const double *__x) __attribute__ ((__nothrow__ ));
6900
6901
6902
6903
6904extern int totalorder (const double *__x, const double *__y) __attribute__ ((__nothrow__ ))
6905
6906 __attribute__ ((__pure__));
6907
6908
6909extern int totalordermag (const double *__x, const double *__y) __attribute__ ((__nothrow__ ))
6910
6911 __attribute__ ((__pure__));
6912
6913
6914extern double getpayload (const double *__x) __attribute__ ((__nothrow__ )); extern double __getpayload (const double *__x) __attribute__ ((__nothrow__ ));
6915
6916
6917extern int setpayload (double *__x, double __payload) __attribute__ ((__nothrow__ ));
6918
6919
6920extern int setpayloadsig (double *__x, double __payload) __attribute__ ((__nothrow__ ));
6921
6922
6923
6924
6925
6926
6927
6928extern double scalb (double __x, double __n) __attribute__ ((__nothrow__ )); extern double __scalb (double __x, double __n) __attribute__ ((__nothrow__ ));
6929
6930
6931
6932
6933
6934
6935
6936
6937extern int __fpclassifyf (float __value) __attribute__ ((__nothrow__ ))
6938 __attribute__ ((__const__));
6939
6940
6941extern int __signbitf (float __value) __attribute__ ((__nothrow__ ))
6942 __attribute__ ((__const__));
6943
6944
6945
6946extern int __isinff (float __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6947
6948
6949extern int __finitef (float __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6950
6951
6952extern int __isnanf (float __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
6953
6954
6955extern int __iseqsigf (float __x, float __y) __attribute__ ((__nothrow__ ));
6956
6957
6958extern int __issignalingf (float __value) __attribute__ ((__nothrow__ ))
6959 __attribute__ ((__const__));
6960extern float acosf (float __x) __attribute__ ((__nothrow__ )); extern float __acosf (float __x) __attribute__ ((__nothrow__ ));
6961
6962extern float asinf (float __x) __attribute__ ((__nothrow__ )); extern float __asinf (float __x) __attribute__ ((__nothrow__ ));
6963
6964extern float atanf (float __x) __attribute__ ((__nothrow__ )); extern float __atanf (float __x) __attribute__ ((__nothrow__ ));
6965
6966extern float atan2f (float __y, float __x) __attribute__ ((__nothrow__ )); extern float __atan2f (float __y, float __x) __attribute__ ((__nothrow__ ));
6967
6968
6969 extern float cosf (float __x) __attribute__ ((__nothrow__ )); extern float __cosf (float __x) __attribute__ ((__nothrow__ ));
6970
6971 extern float sinf (float __x) __attribute__ ((__nothrow__ )); extern float __sinf (float __x) __attribute__ ((__nothrow__ ));
6972
6973extern float tanf (float __x) __attribute__ ((__nothrow__ )); extern float __tanf (float __x) __attribute__ ((__nothrow__ ));
6974
6975
6976
6977
6978extern float coshf (float __x) __attribute__ ((__nothrow__ )); extern float __coshf (float __x) __attribute__ ((__nothrow__ ));
6979
6980extern float sinhf (float __x) __attribute__ ((__nothrow__ )); extern float __sinhf (float __x) __attribute__ ((__nothrow__ ));
6981
6982extern float tanhf (float __x) __attribute__ ((__nothrow__ )); extern float __tanhf (float __x) __attribute__ ((__nothrow__ ));
6983
6984
6985
6986 extern void sincosf (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__ )); extern void __sincosf (float __x, float *__sinx, float *__cosx) __attribute__ ((__nothrow__ ));
6987
6988
6989
6990
6991
6992extern float acoshf (float __x) __attribute__ ((__nothrow__ )); extern float __acoshf (float __x) __attribute__ ((__nothrow__ ));
6993
6994extern float asinhf (float __x) __attribute__ ((__nothrow__ )); extern float __asinhf (float __x) __attribute__ ((__nothrow__ ));
6995
6996extern float atanhf (float __x) __attribute__ ((__nothrow__ )); extern float __atanhf (float __x) __attribute__ ((__nothrow__ ));
6997
6998
6999
7000
7001
7002 extern float expf (float __x) __attribute__ ((__nothrow__ )); extern float __expf (float __x) __attribute__ ((__nothrow__ ));
7003
7004
7005extern float frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ )); extern float __frexpf (float __x, int *__exponent) __attribute__ ((__nothrow__ ));
7006
7007
7008extern float ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ )); extern float __ldexpf (float __x, int __exponent) __attribute__ ((__nothrow__ ));
7009
7010
7011 extern float logf (float __x) __attribute__ ((__nothrow__ )); extern float __logf (float __x) __attribute__ ((__nothrow__ ));
7012
7013
7014extern float log10f (float __x) __attribute__ ((__nothrow__ )); extern float __log10f (float __x) __attribute__ ((__nothrow__ ));
7015
7016
7017extern float modff (float __x, float *__iptr) __attribute__ ((__nothrow__ )); extern float __modff (float __x, float *__iptr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
7018
7019
7020
7021extern float exp10f (float __x) __attribute__ ((__nothrow__ )); extern float __exp10f (float __x) __attribute__ ((__nothrow__ ));
7022
7023
7024
7025
7026extern float expm1f (float __x) __attribute__ ((__nothrow__ )); extern float __expm1f (float __x) __attribute__ ((__nothrow__ ));
7027
7028
7029extern float log1pf (float __x) __attribute__ ((__nothrow__ )); extern float __log1pf (float __x) __attribute__ ((__nothrow__ ));
7030
7031
7032extern float logbf (float __x) __attribute__ ((__nothrow__ )); extern float __logbf (float __x) __attribute__ ((__nothrow__ ));
7033
7034
7035
7036
7037extern float exp2f (float __x) __attribute__ ((__nothrow__ )); extern float __exp2f (float __x) __attribute__ ((__nothrow__ ));
7038
7039
7040extern float log2f (float __x) __attribute__ ((__nothrow__ )); extern float __log2f (float __x) __attribute__ ((__nothrow__ ));
7041
7042
7043
7044
7045
7046
7047 extern float powf (float __x, float __y) __attribute__ ((__nothrow__ )); extern float __powf (float __x, float __y) __attribute__ ((__nothrow__ ));
7048
7049
7050extern float sqrtf (float __x) __attribute__ ((__nothrow__ )); extern float __sqrtf (float __x) __attribute__ ((__nothrow__ ));
7051
7052
7053
7054extern float hypotf (float __x, float __y) __attribute__ ((__nothrow__ )); extern float __hypotf (float __x, float __y) __attribute__ ((__nothrow__ ));
7055
7056
7057
7058
7059extern float cbrtf (float __x) __attribute__ ((__nothrow__ )); extern float __cbrtf (float __x) __attribute__ ((__nothrow__ ));
7060
7061
7062
7063
7064
7065
7066extern float ceilf (float __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern float __ceilf (float __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7067
7068
7069extern float fabsf (float __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern float __fabsf (float __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7070
7071
7072extern float floorf (float __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern float __floorf (float __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7073
7074
7075extern float fmodf (float __x, float __y) __attribute__ ((__nothrow__ )); extern float __fmodf (float __x, float __y) __attribute__ ((__nothrow__ ));
7076extern int isinff (float __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7077
7078
7079
7080
7081extern int finitef (float __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7082
7083
7084extern float dremf (float __x, float __y) __attribute__ ((__nothrow__ )); extern float __dremf (float __x, float __y) __attribute__ ((__nothrow__ ));
7085
7086
7087
7088extern float significandf (float __x) __attribute__ ((__nothrow__ )); extern float __significandf (float __x) __attribute__ ((__nothrow__ ));
7089
7090
7091
7092
7093
7094
7095extern float copysignf (float __x, float __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern float __copysignf (float __x, float __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7096
7097
7098
7099
7100extern float nanf (const char *__tagb) __attribute__ ((__nothrow__ )); extern float __nanf (const char *__tagb) __attribute__ ((__nothrow__ ));
7101extern int isnanf (float __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7102
7103
7104
7105
7106
7107extern float j0f (float) __attribute__ ((__nothrow__ )); extern float __j0f (float) __attribute__ ((__nothrow__ ));
7108extern float j1f (float) __attribute__ ((__nothrow__ )); extern float __j1f (float) __attribute__ ((__nothrow__ ));
7109extern float jnf (int, float) __attribute__ ((__nothrow__ )); extern float __jnf (int, float) __attribute__ ((__nothrow__ ));
7110extern float y0f (float) __attribute__ ((__nothrow__ )); extern float __y0f (float) __attribute__ ((__nothrow__ ));
7111extern float y1f (float) __attribute__ ((__nothrow__ )); extern float __y1f (float) __attribute__ ((__nothrow__ ));
7112extern float ynf (int, float) __attribute__ ((__nothrow__ )); extern float __ynf (int, float) __attribute__ ((__nothrow__ ));
7113
7114
7115
7116
7117
7118extern float erff (float) __attribute__ ((__nothrow__ )); extern float __erff (float) __attribute__ ((__nothrow__ ));
7119extern float erfcf (float) __attribute__ ((__nothrow__ )); extern float __erfcf (float) __attribute__ ((__nothrow__ ));
7120extern float lgammaf (float) __attribute__ ((__nothrow__ )); extern float __lgammaf (float) __attribute__ ((__nothrow__ ));
7121
7122
7123
7124
7125extern float tgammaf (float) __attribute__ ((__nothrow__ )); extern float __tgammaf (float) __attribute__ ((__nothrow__ ));
7126
7127
7128
7129
7130
7131extern float gammaf (float) __attribute__ ((__nothrow__ )); extern float __gammaf (float) __attribute__ ((__nothrow__ ));
7132
7133
7134
7135
7136
7137
7138
7139extern float lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ )); extern float __lgammaf_r (float, int *__signgamp) __attribute__ ((__nothrow__ ));
7140
7141
7142
7143
7144
7145
7146extern float rintf (float __x) __attribute__ ((__nothrow__ )); extern float __rintf (float __x) __attribute__ ((__nothrow__ ));
7147
7148
7149extern float nextafterf (float __x, float __y) __attribute__ ((__nothrow__ )); extern float __nextafterf (float __x, float __y) __attribute__ ((__nothrow__ ));
7150
7151extern float nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ )); extern float __nexttowardf (float __x, long double __y) __attribute__ ((__nothrow__ ));
7152
7153
7154
7155
7156extern float nextdownf (float __x) __attribute__ ((__nothrow__ )); extern float __nextdownf (float __x) __attribute__ ((__nothrow__ ));
7157
7158extern float nextupf (float __x) __attribute__ ((__nothrow__ )); extern float __nextupf (float __x) __attribute__ ((__nothrow__ ));
7159
7160
7161
7162extern float remainderf (float __x, float __y) __attribute__ ((__nothrow__ )); extern float __remainderf (float __x, float __y) __attribute__ ((__nothrow__ ));
7163
7164
7165
7166extern float scalbnf (float __x, int __n) __attribute__ ((__nothrow__ )); extern float __scalbnf (float __x, int __n) __attribute__ ((__nothrow__ ));
7167
7168
7169
7170extern int ilogbf (float __x) __attribute__ ((__nothrow__ )); extern int __ilogbf (float __x) __attribute__ ((__nothrow__ ));
7171
7172
7173
7174
7175extern long int llogbf (float __x) __attribute__ ((__nothrow__ )); extern long int __llogbf (float __x) __attribute__ ((__nothrow__ ));
7176
7177
7178
7179
7180extern float scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ )); extern float __scalblnf (float __x, long int __n) __attribute__ ((__nothrow__ ));
7181
7182
7183
7184extern float nearbyintf (float __x) __attribute__ ((__nothrow__ )); extern float __nearbyintf (float __x) __attribute__ ((__nothrow__ ));
7185
7186
7187
7188extern float roundf (float __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern float __roundf (float __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7189
7190
7191
7192extern float truncf (float __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern float __truncf (float __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7193
7194
7195
7196
7197extern float remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ )); extern float __remquof (float __x, float __y, int *__quo) __attribute__ ((__nothrow__ ));
7198
7199
7200
7201
7202
7203
7204extern long int lrintf (float __x) __attribute__ ((__nothrow__ )); extern long int __lrintf (float __x) __attribute__ ((__nothrow__ ));
7205__extension__
7206extern long long int llrintf (float __x) __attribute__ ((__nothrow__ )); extern long long int __llrintf (float __x) __attribute__ ((__nothrow__ ));
7207
7208
7209
7210extern long int lroundf (float __x) __attribute__ ((__nothrow__ )); extern long int __lroundf (float __x) __attribute__ ((__nothrow__ ));
7211__extension__
7212extern long long int llroundf (float __x) __attribute__ ((__nothrow__ )); extern long long int __llroundf (float __x) __attribute__ ((__nothrow__ ));
7213
7214
7215
7216extern float fdimf (float __x, float __y) __attribute__ ((__nothrow__ )); extern float __fdimf (float __x, float __y) __attribute__ ((__nothrow__ ));
7217
7218
7219extern float fmaxf (float __x, float __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern float __fmaxf (float __x, float __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7220
7221
7222extern float fminf (float __x, float __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern float __fminf (float __x, float __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7223
7224
7225extern float fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ )); extern float __fmaf (float __x, float __y, float __z) __attribute__ ((__nothrow__ ));
7226
7227
7228
7229
7230extern float roundevenf (float __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern float __roundevenf (float __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7231
7232
7233
7234extern __intmax_t fromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __intmax_t __fromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
7235
7236
7237
7238
7239extern __uintmax_t ufromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __uintmax_t __ufromfpf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
7240
7241
7242
7243
7244
7245extern __intmax_t fromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __intmax_t __fromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
7246
7247
7248
7249
7250
7251extern __uintmax_t ufromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __uintmax_t __ufromfpxf (float __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
7252
7253
7254
7255extern float fmaxmagf (float __x, float __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern float __fmaxmagf (float __x, float __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7256
7257
7258extern float fminmagf (float __x, float __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern float __fminmagf (float __x, float __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7259
7260
7261extern int canonicalizef (float *__cx, const float *__x) __attribute__ ((__nothrow__ ));
7262
7263
7264
7265
7266extern int totalorderf (const float *__x, const float *__y) __attribute__ ((__nothrow__ ))
7267
7268 __attribute__ ((__pure__));
7269
7270
7271extern int totalordermagf (const float *__x, const float *__y) __attribute__ ((__nothrow__ ))
7272
7273 __attribute__ ((__pure__));
7274
7275
7276extern float getpayloadf (const float *__x) __attribute__ ((__nothrow__ )); extern float __getpayloadf (const float *__x) __attribute__ ((__nothrow__ ));
7277
7278
7279extern int setpayloadf (float *__x, float __payload) __attribute__ ((__nothrow__ ));
7280
7281
7282extern int setpayloadsigf (float *__x, float __payload) __attribute__ ((__nothrow__ ));
7283
7284
7285
7286
7287
7288
7289
7290extern float scalbf (float __x, float __n) __attribute__ ((__nothrow__ )); extern float __scalbf (float __x, float __n) __attribute__ ((__nothrow__ ));
7291
7292extern int __fpclassifyl (long double __value) __attribute__ ((__nothrow__ ))
7293 __attribute__ ((__const__));
7294
7295
7296extern int __signbitl (long double __value) __attribute__ ((__nothrow__ ))
7297 __attribute__ ((__const__));
7298
7299
7300
7301extern int __isinfl (long double __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7302
7303
7304extern int __finitel (long double __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7305
7306
7307extern int __isnanl (long double __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7308
7309
7310extern int __iseqsigl (long double __x, long double __y) __attribute__ ((__nothrow__ ));
7311
7312
7313extern int __issignalingl (long double __value) __attribute__ ((__nothrow__ ))
7314 __attribute__ ((__const__));
7315extern long double acosl (long double __x) __attribute__ ((__nothrow__ )); extern long double __acosl (long double __x) __attribute__ ((__nothrow__ ));
7316
7317extern long double asinl (long double __x) __attribute__ ((__nothrow__ )); extern long double __asinl (long double __x) __attribute__ ((__nothrow__ ));
7318
7319extern long double atanl (long double __x) __attribute__ ((__nothrow__ )); extern long double __atanl (long double __x) __attribute__ ((__nothrow__ ));
7320
7321extern long double atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ )); extern long double __atan2l (long double __y, long double __x) __attribute__ ((__nothrow__ ));
7322
7323
7324 extern long double cosl (long double __x) __attribute__ ((__nothrow__ )); extern long double __cosl (long double __x) __attribute__ ((__nothrow__ ));
7325
7326 extern long double sinl (long double __x) __attribute__ ((__nothrow__ )); extern long double __sinl (long double __x) __attribute__ ((__nothrow__ ));
7327
7328extern long double tanl (long double __x) __attribute__ ((__nothrow__ )); extern long double __tanl (long double __x) __attribute__ ((__nothrow__ ));
7329
7330
7331
7332
7333extern long double coshl (long double __x) __attribute__ ((__nothrow__ )); extern long double __coshl (long double __x) __attribute__ ((__nothrow__ ));
7334
7335extern long double sinhl (long double __x) __attribute__ ((__nothrow__ )); extern long double __sinhl (long double __x) __attribute__ ((__nothrow__ ));
7336
7337extern long double tanhl (long double __x) __attribute__ ((__nothrow__ )); extern long double __tanhl (long double __x) __attribute__ ((__nothrow__ ));
7338
7339
7340
7341 extern void sincosl (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__ )); extern void __sincosl (long double __x, long double *__sinx, long double *__cosx) __attribute__ ((__nothrow__ ));
7342
7343
7344
7345
7346
7347extern long double acoshl (long double __x) __attribute__ ((__nothrow__ )); extern long double __acoshl (long double __x) __attribute__ ((__nothrow__ ));
7348
7349extern long double asinhl (long double __x) __attribute__ ((__nothrow__ )); extern long double __asinhl (long double __x) __attribute__ ((__nothrow__ ));
7350
7351extern long double atanhl (long double __x) __attribute__ ((__nothrow__ )); extern long double __atanhl (long double __x) __attribute__ ((__nothrow__ ));
7352
7353
7354
7355
7356
7357 extern long double expl (long double __x) __attribute__ ((__nothrow__ )); extern long double __expl (long double __x) __attribute__ ((__nothrow__ ));
7358
7359
7360extern long double frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ )); extern long double __frexpl (long double __x, int *__exponent) __attribute__ ((__nothrow__ ));
7361
7362
7363extern long double ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ )); extern long double __ldexpl (long double __x, int __exponent) __attribute__ ((__nothrow__ ));
7364
7365
7366 extern long double logl (long double __x) __attribute__ ((__nothrow__ )); extern long double __logl (long double __x) __attribute__ ((__nothrow__ ));
7367
7368
7369extern long double log10l (long double __x) __attribute__ ((__nothrow__ )); extern long double __log10l (long double __x) __attribute__ ((__nothrow__ ));
7370
7371
7372extern long double modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ )); extern long double __modfl (long double __x, long double *__iptr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
7373
7374
7375
7376extern long double exp10l (long double __x) __attribute__ ((__nothrow__ )); extern long double __exp10l (long double __x) __attribute__ ((__nothrow__ ));
7377
7378
7379
7380
7381extern long double expm1l (long double __x) __attribute__ ((__nothrow__ )); extern long double __expm1l (long double __x) __attribute__ ((__nothrow__ ));
7382
7383
7384extern long double log1pl (long double __x) __attribute__ ((__nothrow__ )); extern long double __log1pl (long double __x) __attribute__ ((__nothrow__ ));
7385
7386
7387extern long double logbl (long double __x) __attribute__ ((__nothrow__ )); extern long double __logbl (long double __x) __attribute__ ((__nothrow__ ));
7388
7389
7390
7391
7392extern long double exp2l (long double __x) __attribute__ ((__nothrow__ )); extern long double __exp2l (long double __x) __attribute__ ((__nothrow__ ));
7393
7394
7395extern long double log2l (long double __x) __attribute__ ((__nothrow__ )); extern long double __log2l (long double __x) __attribute__ ((__nothrow__ ));
7396
7397
7398
7399
7400
7401
7402 extern long double powl (long double __x, long double __y) __attribute__ ((__nothrow__ )); extern long double __powl (long double __x, long double __y) __attribute__ ((__nothrow__ ));
7403
7404
7405extern long double sqrtl (long double __x) __attribute__ ((__nothrow__ )); extern long double __sqrtl (long double __x) __attribute__ ((__nothrow__ ));
7406
7407
7408
7409extern long double hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ )); extern long double __hypotl (long double __x, long double __y) __attribute__ ((__nothrow__ ));
7410
7411
7412
7413
7414extern long double cbrtl (long double __x) __attribute__ ((__nothrow__ )); extern long double __cbrtl (long double __x) __attribute__ ((__nothrow__ ));
7415
7416
7417
7418
7419
7420
7421extern long double ceill (long double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern long double __ceill (long double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7422
7423
7424extern long double fabsl (long double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern long double __fabsl (long double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7425
7426
7427extern long double floorl (long double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern long double __floorl (long double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7428
7429
7430extern long double fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ )); extern long double __fmodl (long double __x, long double __y) __attribute__ ((__nothrow__ ));
7431extern int isinfl (long double __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7432
7433
7434
7435
7436extern int finitel (long double __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7437
7438
7439extern long double dreml (long double __x, long double __y) __attribute__ ((__nothrow__ )); extern long double __dreml (long double __x, long double __y) __attribute__ ((__nothrow__ ));
7440
7441
7442
7443extern long double significandl (long double __x) __attribute__ ((__nothrow__ )); extern long double __significandl (long double __x) __attribute__ ((__nothrow__ ));
7444
7445
7446
7447
7448
7449
7450extern long double copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern long double __copysignl (long double __x, long double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7451
7452
7453
7454
7455extern long double nanl (const char *__tagb) __attribute__ ((__nothrow__ )); extern long double __nanl (const char *__tagb) __attribute__ ((__nothrow__ ));
7456extern int isnanl (long double __value) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7457
7458
7459
7460
7461
7462extern long double j0l (long double) __attribute__ ((__nothrow__ )); extern long double __j0l (long double) __attribute__ ((__nothrow__ ));
7463extern long double j1l (long double) __attribute__ ((__nothrow__ )); extern long double __j1l (long double) __attribute__ ((__nothrow__ ));
7464extern long double jnl (int, long double) __attribute__ ((__nothrow__ )); extern long double __jnl (int, long double) __attribute__ ((__nothrow__ ));
7465extern long double y0l (long double) __attribute__ ((__nothrow__ )); extern long double __y0l (long double) __attribute__ ((__nothrow__ ));
7466extern long double y1l (long double) __attribute__ ((__nothrow__ )); extern long double __y1l (long double) __attribute__ ((__nothrow__ ));
7467extern long double ynl (int, long double) __attribute__ ((__nothrow__ )); extern long double __ynl (int, long double) __attribute__ ((__nothrow__ ));
7468
7469
7470
7471
7472
7473extern long double erfl (long double) __attribute__ ((__nothrow__ )); extern long double __erfl (long double) __attribute__ ((__nothrow__ ));
7474extern long double erfcl (long double) __attribute__ ((__nothrow__ )); extern long double __erfcl (long double) __attribute__ ((__nothrow__ ));
7475extern long double lgammal (long double) __attribute__ ((__nothrow__ )); extern long double __lgammal (long double) __attribute__ ((__nothrow__ ));
7476
7477
7478
7479
7480extern long double tgammal (long double) __attribute__ ((__nothrow__ )); extern long double __tgammal (long double) __attribute__ ((__nothrow__ ));
7481
7482
7483
7484
7485
7486extern long double gammal (long double) __attribute__ ((__nothrow__ )); extern long double __gammal (long double) __attribute__ ((__nothrow__ ));
7487
7488
7489
7490
7491
7492
7493
7494extern long double lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ )); extern long double __lgammal_r (long double, int *__signgamp) __attribute__ ((__nothrow__ ));
7495
7496
7497
7498
7499
7500
7501extern long double rintl (long double __x) __attribute__ ((__nothrow__ )); extern long double __rintl (long double __x) __attribute__ ((__nothrow__ ));
7502
7503
7504extern long double nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ )); extern long double __nextafterl (long double __x, long double __y) __attribute__ ((__nothrow__ ));
7505
7506extern long double nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ )); extern long double __nexttowardl (long double __x, long double __y) __attribute__ ((__nothrow__ ));
7507
7508
7509
7510
7511extern long double nextdownl (long double __x) __attribute__ ((__nothrow__ )); extern long double __nextdownl (long double __x) __attribute__ ((__nothrow__ ));
7512
7513extern long double nextupl (long double __x) __attribute__ ((__nothrow__ )); extern long double __nextupl (long double __x) __attribute__ ((__nothrow__ ));
7514
7515
7516
7517extern long double remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ )); extern long double __remainderl (long double __x, long double __y) __attribute__ ((__nothrow__ ));
7518
7519
7520
7521extern long double scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ )); extern long double __scalbnl (long double __x, int __n) __attribute__ ((__nothrow__ ));
7522
7523
7524
7525extern int ilogbl (long double __x) __attribute__ ((__nothrow__ )); extern int __ilogbl (long double __x) __attribute__ ((__nothrow__ ));
7526
7527
7528
7529
7530extern long int llogbl (long double __x) __attribute__ ((__nothrow__ )); extern long int __llogbl (long double __x) __attribute__ ((__nothrow__ ));
7531
7532
7533
7534
7535extern long double scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ )); extern long double __scalblnl (long double __x, long int __n) __attribute__ ((__nothrow__ ));
7536
7537
7538
7539extern long double nearbyintl (long double __x) __attribute__ ((__nothrow__ )); extern long double __nearbyintl (long double __x) __attribute__ ((__nothrow__ ));
7540
7541
7542
7543extern long double roundl (long double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern long double __roundl (long double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7544
7545
7546
7547extern long double truncl (long double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern long double __truncl (long double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7548
7549
7550
7551
7552extern long double remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ )); extern long double __remquol (long double __x, long double __y, int *__quo) __attribute__ ((__nothrow__ ));
7553
7554
7555
7556
7557
7558
7559extern long int lrintl (long double __x) __attribute__ ((__nothrow__ )); extern long int __lrintl (long double __x) __attribute__ ((__nothrow__ ));
7560__extension__
7561extern long long int llrintl (long double __x) __attribute__ ((__nothrow__ )); extern long long int __llrintl (long double __x) __attribute__ ((__nothrow__ ));
7562
7563
7564
7565extern long int lroundl (long double __x) __attribute__ ((__nothrow__ )); extern long int __lroundl (long double __x) __attribute__ ((__nothrow__ ));
7566__extension__
7567extern long long int llroundl (long double __x) __attribute__ ((__nothrow__ )); extern long long int __llroundl (long double __x) __attribute__ ((__nothrow__ ));
7568
7569
7570
7571extern long double fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ )); extern long double __fdiml (long double __x, long double __y) __attribute__ ((__nothrow__ ));
7572
7573
7574extern long double fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern long double __fmaxl (long double __x, long double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7575
7576
7577extern long double fminl (long double __x, long double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern long double __fminl (long double __x, long double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7578
7579
7580extern long double fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ )); extern long double __fmal (long double __x, long double __y, long double __z) __attribute__ ((__nothrow__ ));
7581
7582
7583
7584
7585extern long double roundevenl (long double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern long double __roundevenl (long double __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7586
7587
7588
7589extern __intmax_t fromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __intmax_t __fromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
7590
7591
7592
7593
7594extern __uintmax_t ufromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __uintmax_t __ufromfpl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
7595
7596
7597
7598
7599
7600extern __intmax_t fromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __intmax_t __fromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
7601
7602
7603
7604
7605
7606extern __uintmax_t ufromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __uintmax_t __ufromfpxl (long double __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
7607
7608
7609
7610extern long double fmaxmagl (long double __x, long double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern long double __fmaxmagl (long double __x, long double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7611
7612
7613extern long double fminmagl (long double __x, long double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern long double __fminmagl (long double __x, long double __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7614
7615
7616extern int canonicalizel (long double *__cx, const long double *__x) __attribute__ ((__nothrow__ ));
7617
7618
7619
7620
7621extern int totalorderl (const long double *__x, const long double *__y) __attribute__ ((__nothrow__ ))
7622
7623 __attribute__ ((__pure__));
7624
7625
7626extern int totalordermagl (const long double *__x, const long double *__y) __attribute__ ((__nothrow__ ))
7627
7628 __attribute__ ((__pure__));
7629
7630
7631extern long double getpayloadl (const long double *__x) __attribute__ ((__nothrow__ )); extern long double __getpayloadl (const long double *__x) __attribute__ ((__nothrow__ ));
7632
7633
7634extern int setpayloadl (long double *__x, long double __payload) __attribute__ ((__nothrow__ ));
7635
7636
7637extern int setpayloadsigl (long double *__x, long double __payload) __attribute__ ((__nothrow__ ));
7638
7639
7640
7641
7642
7643
7644
7645extern long double scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ )); extern long double __scalbl (long double __x, long double __n) __attribute__ ((__nothrow__ ));
7646
7647
7648
7649
7650
7651extern _Float32 acosf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __acosf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7652
7653extern _Float32 asinf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __asinf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7654
7655extern _Float32 atanf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __atanf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7656
7657extern _Float32 atan2f32 (_Float32 __y, _Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __atan2f32 (_Float32 __y, _Float32 __x) __attribute__ ((__nothrow__ ));
7658
7659
7660 extern _Float32 cosf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __cosf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7661
7662 extern _Float32 sinf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __sinf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7663
7664extern _Float32 tanf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __tanf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7665
7666
7667
7668
7669extern _Float32 coshf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __coshf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7670
7671extern _Float32 sinhf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __sinhf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7672
7673extern _Float32 tanhf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __tanhf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7674
7675
7676
7677 extern void sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) __attribute__ ((__nothrow__ )); extern void __sincosf32 (_Float32 __x, _Float32 *__sinx, _Float32 *__cosx) __attribute__ ((__nothrow__ ));
7678
7679
7680
7681
7682
7683extern _Float32 acoshf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __acoshf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7684
7685extern _Float32 asinhf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __asinhf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7686
7687extern _Float32 atanhf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __atanhf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7688
7689
7690
7691
7692
7693 extern _Float32 expf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __expf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7694
7695
7696extern _Float32 frexpf32 (_Float32 __x, int *__exponent) __attribute__ ((__nothrow__ )); extern _Float32 __frexpf32 (_Float32 __x, int *__exponent) __attribute__ ((__nothrow__ ));
7697
7698
7699extern _Float32 ldexpf32 (_Float32 __x, int __exponent) __attribute__ ((__nothrow__ )); extern _Float32 __ldexpf32 (_Float32 __x, int __exponent) __attribute__ ((__nothrow__ ));
7700
7701
7702 extern _Float32 logf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __logf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7703
7704
7705extern _Float32 log10f32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __log10f32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7706
7707
7708extern _Float32 modff32 (_Float32 __x, _Float32 *__iptr) __attribute__ ((__nothrow__ )); extern _Float32 __modff32 (_Float32 __x, _Float32 *__iptr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
7709
7710
7711
7712extern _Float32 exp10f32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __exp10f32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7713
7714
7715
7716
7717extern _Float32 expm1f32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __expm1f32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7718
7719
7720extern _Float32 log1pf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __log1pf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7721
7722
7723extern _Float32 logbf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __logbf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7724
7725
7726
7727
7728extern _Float32 exp2f32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __exp2f32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7729
7730
7731extern _Float32 log2f32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __log2f32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7732
7733
7734
7735
7736
7737
7738 extern _Float32 powf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ )); extern _Float32 __powf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ ));
7739
7740
7741extern _Float32 sqrtf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __sqrtf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7742
7743
7744
7745extern _Float32 hypotf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ )); extern _Float32 __hypotf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ ));
7746
7747
7748
7749
7750extern _Float32 cbrtf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __cbrtf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7751
7752
7753
7754
7755
7756
7757extern _Float32 ceilf32 (_Float32 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32 __ceilf32 (_Float32 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7758
7759
7760extern _Float32 fabsf32 (_Float32 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32 __fabsf32 (_Float32 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7761
7762
7763extern _Float32 floorf32 (_Float32 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32 __floorf32 (_Float32 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7764
7765
7766extern _Float32 fmodf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ )); extern _Float32 __fmodf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ ));
7767extern _Float32 copysignf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32 __copysignf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7768
7769
7770
7771
7772extern _Float32 nanf32 (const char *__tagb) __attribute__ ((__nothrow__ )); extern _Float32 __nanf32 (const char *__tagb) __attribute__ ((__nothrow__ ));
7773extern _Float32 j0f32 (_Float32) __attribute__ ((__nothrow__ )); extern _Float32 __j0f32 (_Float32) __attribute__ ((__nothrow__ ));
7774extern _Float32 j1f32 (_Float32) __attribute__ ((__nothrow__ )); extern _Float32 __j1f32 (_Float32) __attribute__ ((__nothrow__ ));
7775extern _Float32 jnf32 (int, _Float32) __attribute__ ((__nothrow__ )); extern _Float32 __jnf32 (int, _Float32) __attribute__ ((__nothrow__ ));
7776extern _Float32 y0f32 (_Float32) __attribute__ ((__nothrow__ )); extern _Float32 __y0f32 (_Float32) __attribute__ ((__nothrow__ ));
7777extern _Float32 y1f32 (_Float32) __attribute__ ((__nothrow__ )); extern _Float32 __y1f32 (_Float32) __attribute__ ((__nothrow__ ));
7778extern _Float32 ynf32 (int, _Float32) __attribute__ ((__nothrow__ )); extern _Float32 __ynf32 (int, _Float32) __attribute__ ((__nothrow__ ));
7779
7780
7781
7782
7783
7784extern _Float32 erff32 (_Float32) __attribute__ ((__nothrow__ )); extern _Float32 __erff32 (_Float32) __attribute__ ((__nothrow__ ));
7785extern _Float32 erfcf32 (_Float32) __attribute__ ((__nothrow__ )); extern _Float32 __erfcf32 (_Float32) __attribute__ ((__nothrow__ ));
7786extern _Float32 lgammaf32 (_Float32) __attribute__ ((__nothrow__ )); extern _Float32 __lgammaf32 (_Float32) __attribute__ ((__nothrow__ ));
7787
7788
7789
7790
7791extern _Float32 tgammaf32 (_Float32) __attribute__ ((__nothrow__ )); extern _Float32 __tgammaf32 (_Float32) __attribute__ ((__nothrow__ ));
7792extern _Float32 lgammaf32_r (_Float32, int *__signgamp) __attribute__ ((__nothrow__ )); extern _Float32 __lgammaf32_r (_Float32, int *__signgamp) __attribute__ ((__nothrow__ ));
7793
7794
7795
7796
7797
7798
7799extern _Float32 rintf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __rintf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7800
7801
7802extern _Float32 nextafterf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ )); extern _Float32 __nextafterf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ ));
7803
7804
7805
7806
7807
7808
7809extern _Float32 nextdownf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __nextdownf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7810
7811extern _Float32 nextupf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __nextupf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7812
7813
7814
7815extern _Float32 remainderf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ )); extern _Float32 __remainderf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ ));
7816
7817
7818
7819extern _Float32 scalbnf32 (_Float32 __x, int __n) __attribute__ ((__nothrow__ )); extern _Float32 __scalbnf32 (_Float32 __x, int __n) __attribute__ ((__nothrow__ ));
7820
7821
7822
7823extern int ilogbf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern int __ilogbf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7824
7825
7826
7827
7828extern long int llogbf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern long int __llogbf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7829
7830
7831
7832
7833extern _Float32 scalblnf32 (_Float32 __x, long int __n) __attribute__ ((__nothrow__ )); extern _Float32 __scalblnf32 (_Float32 __x, long int __n) __attribute__ ((__nothrow__ ));
7834
7835
7836
7837extern _Float32 nearbyintf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern _Float32 __nearbyintf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7838
7839
7840
7841extern _Float32 roundf32 (_Float32 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32 __roundf32 (_Float32 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7842
7843
7844
7845extern _Float32 truncf32 (_Float32 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32 __truncf32 (_Float32 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7846
7847
7848
7849
7850extern _Float32 remquof32 (_Float32 __x, _Float32 __y, int *__quo) __attribute__ ((__nothrow__ )); extern _Float32 __remquof32 (_Float32 __x, _Float32 __y, int *__quo) __attribute__ ((__nothrow__ ));
7851
7852
7853
7854
7855
7856
7857extern long int lrintf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern long int __lrintf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7858__extension__
7859extern long long int llrintf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern long long int __llrintf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7860
7861
7862
7863extern long int lroundf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern long int __lroundf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7864__extension__
7865extern long long int llroundf32 (_Float32 __x) __attribute__ ((__nothrow__ )); extern long long int __llroundf32 (_Float32 __x) __attribute__ ((__nothrow__ ));
7866
7867
7868
7869extern _Float32 fdimf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ )); extern _Float32 __fdimf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ ));
7870
7871
7872extern _Float32 fmaxf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32 __fmaxf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7873
7874
7875extern _Float32 fminf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32 __fminf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7876
7877
7878extern _Float32 fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) __attribute__ ((__nothrow__ )); extern _Float32 __fmaf32 (_Float32 __x, _Float32 __y, _Float32 __z) __attribute__ ((__nothrow__ ));
7879
7880
7881
7882
7883extern _Float32 roundevenf32 (_Float32 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32 __roundevenf32 (_Float32 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7884
7885
7886
7887extern __intmax_t fromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __intmax_t __fromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
7888
7889
7890
7891
7892extern __uintmax_t ufromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __uintmax_t __ufromfpf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
7893
7894
7895
7896
7897
7898extern __intmax_t fromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __intmax_t __fromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
7899
7900
7901
7902
7903
7904extern __uintmax_t ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __uintmax_t __ufromfpxf32 (_Float32 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
7905
7906
7907
7908extern _Float32 fmaxmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32 __fmaxmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7909
7910
7911extern _Float32 fminmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32 __fminmagf32 (_Float32 __x, _Float32 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
7912
7913
7914extern int canonicalizef32 (_Float32 *__cx, const _Float32 *__x) __attribute__ ((__nothrow__ ));
7915
7916
7917
7918
7919extern int totalorderf32 (const _Float32 *__x, const _Float32 *__y) __attribute__ ((__nothrow__ ))
7920
7921 __attribute__ ((__pure__));
7922
7923
7924extern int totalordermagf32 (const _Float32 *__x, const _Float32 *__y) __attribute__ ((__nothrow__ ))
7925
7926 __attribute__ ((__pure__));
7927
7928
7929extern _Float32 getpayloadf32 (const _Float32 *__x) __attribute__ ((__nothrow__ )); extern _Float32 __getpayloadf32 (const _Float32 *__x) __attribute__ ((__nothrow__ ));
7930
7931
7932extern int setpayloadf32 (_Float32 *__x, _Float32 __payload) __attribute__ ((__nothrow__ ));
7933
7934
7935extern int setpayloadsigf32 (_Float32 *__x, _Float32 __payload) __attribute__ ((__nothrow__ ));
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945extern _Float64 acosf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __acosf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
7946
7947extern _Float64 asinf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __asinf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
7948
7949extern _Float64 atanf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __atanf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
7950
7951extern _Float64 atan2f64 (_Float64 __y, _Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __atan2f64 (_Float64 __y, _Float64 __x) __attribute__ ((__nothrow__ ));
7952
7953
7954 extern _Float64 cosf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __cosf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
7955
7956 extern _Float64 sinf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __sinf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
7957
7958extern _Float64 tanf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __tanf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
7959
7960
7961
7962
7963extern _Float64 coshf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __coshf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
7964
7965extern _Float64 sinhf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __sinhf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
7966
7967extern _Float64 tanhf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __tanhf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
7968
7969
7970
7971 extern void sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) __attribute__ ((__nothrow__ )); extern void __sincosf64 (_Float64 __x, _Float64 *__sinx, _Float64 *__cosx) __attribute__ ((__nothrow__ ));
7972
7973
7974
7975
7976
7977extern _Float64 acoshf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __acoshf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
7978
7979extern _Float64 asinhf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __asinhf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
7980
7981extern _Float64 atanhf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __atanhf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
7982
7983
7984
7985
7986
7987 extern _Float64 expf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __expf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
7988
7989
7990extern _Float64 frexpf64 (_Float64 __x, int *__exponent) __attribute__ ((__nothrow__ )); extern _Float64 __frexpf64 (_Float64 __x, int *__exponent) __attribute__ ((__nothrow__ ));
7991
7992
7993extern _Float64 ldexpf64 (_Float64 __x, int __exponent) __attribute__ ((__nothrow__ )); extern _Float64 __ldexpf64 (_Float64 __x, int __exponent) __attribute__ ((__nothrow__ ));
7994
7995
7996 extern _Float64 logf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __logf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
7997
7998
7999extern _Float64 log10f64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __log10f64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8000
8001
8002extern _Float64 modff64 (_Float64 __x, _Float64 *__iptr) __attribute__ ((__nothrow__ )); extern _Float64 __modff64 (_Float64 __x, _Float64 *__iptr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
8003
8004
8005
8006extern _Float64 exp10f64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __exp10f64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8007
8008
8009
8010
8011extern _Float64 expm1f64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __expm1f64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8012
8013
8014extern _Float64 log1pf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __log1pf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8015
8016
8017extern _Float64 logbf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __logbf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8018
8019
8020
8021
8022extern _Float64 exp2f64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __exp2f64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8023
8024
8025extern _Float64 log2f64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __log2f64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8026
8027
8028
8029
8030
8031
8032 extern _Float64 powf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ )); extern _Float64 __powf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ ));
8033
8034
8035extern _Float64 sqrtf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __sqrtf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8036
8037
8038
8039extern _Float64 hypotf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ )); extern _Float64 __hypotf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ ));
8040
8041
8042
8043
8044extern _Float64 cbrtf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __cbrtf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8045
8046
8047
8048
8049
8050
8051extern _Float64 ceilf64 (_Float64 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64 __ceilf64 (_Float64 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8052
8053
8054extern _Float64 fabsf64 (_Float64 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64 __fabsf64 (_Float64 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8055
8056
8057extern _Float64 floorf64 (_Float64 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64 __floorf64 (_Float64 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8058
8059
8060extern _Float64 fmodf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ )); extern _Float64 __fmodf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ ));
8061extern _Float64 copysignf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64 __copysignf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8062
8063
8064
8065
8066extern _Float64 nanf64 (const char *__tagb) __attribute__ ((__nothrow__ )); extern _Float64 __nanf64 (const char *__tagb) __attribute__ ((__nothrow__ ));
8067extern _Float64 j0f64 (_Float64) __attribute__ ((__nothrow__ )); extern _Float64 __j0f64 (_Float64) __attribute__ ((__nothrow__ ));
8068extern _Float64 j1f64 (_Float64) __attribute__ ((__nothrow__ )); extern _Float64 __j1f64 (_Float64) __attribute__ ((__nothrow__ ));
8069extern _Float64 jnf64 (int, _Float64) __attribute__ ((__nothrow__ )); extern _Float64 __jnf64 (int, _Float64) __attribute__ ((__nothrow__ ));
8070extern _Float64 y0f64 (_Float64) __attribute__ ((__nothrow__ )); extern _Float64 __y0f64 (_Float64) __attribute__ ((__nothrow__ ));
8071extern _Float64 y1f64 (_Float64) __attribute__ ((__nothrow__ )); extern _Float64 __y1f64 (_Float64) __attribute__ ((__nothrow__ ));
8072extern _Float64 ynf64 (int, _Float64) __attribute__ ((__nothrow__ )); extern _Float64 __ynf64 (int, _Float64) __attribute__ ((__nothrow__ ));
8073
8074
8075
8076
8077
8078extern _Float64 erff64 (_Float64) __attribute__ ((__nothrow__ )); extern _Float64 __erff64 (_Float64) __attribute__ ((__nothrow__ ));
8079extern _Float64 erfcf64 (_Float64) __attribute__ ((__nothrow__ )); extern _Float64 __erfcf64 (_Float64) __attribute__ ((__nothrow__ ));
8080extern _Float64 lgammaf64 (_Float64) __attribute__ ((__nothrow__ )); extern _Float64 __lgammaf64 (_Float64) __attribute__ ((__nothrow__ ));
8081
8082
8083
8084
8085extern _Float64 tgammaf64 (_Float64) __attribute__ ((__nothrow__ )); extern _Float64 __tgammaf64 (_Float64) __attribute__ ((__nothrow__ ));
8086extern _Float64 lgammaf64_r (_Float64, int *__signgamp) __attribute__ ((__nothrow__ )); extern _Float64 __lgammaf64_r (_Float64, int *__signgamp) __attribute__ ((__nothrow__ ));
8087
8088
8089
8090
8091
8092
8093extern _Float64 rintf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __rintf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8094
8095
8096extern _Float64 nextafterf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ )); extern _Float64 __nextafterf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ ));
8097
8098
8099
8100
8101
8102
8103extern _Float64 nextdownf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __nextdownf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8104
8105extern _Float64 nextupf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __nextupf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8106
8107
8108
8109extern _Float64 remainderf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ )); extern _Float64 __remainderf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ ));
8110
8111
8112
8113extern _Float64 scalbnf64 (_Float64 __x, int __n) __attribute__ ((__nothrow__ )); extern _Float64 __scalbnf64 (_Float64 __x, int __n) __attribute__ ((__nothrow__ ));
8114
8115
8116
8117extern int ilogbf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern int __ilogbf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8118
8119
8120
8121
8122extern long int llogbf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern long int __llogbf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8123
8124
8125
8126
8127extern _Float64 scalblnf64 (_Float64 __x, long int __n) __attribute__ ((__nothrow__ )); extern _Float64 __scalblnf64 (_Float64 __x, long int __n) __attribute__ ((__nothrow__ ));
8128
8129
8130
8131extern _Float64 nearbyintf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern _Float64 __nearbyintf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8132
8133
8134
8135extern _Float64 roundf64 (_Float64 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64 __roundf64 (_Float64 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8136
8137
8138
8139extern _Float64 truncf64 (_Float64 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64 __truncf64 (_Float64 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8140
8141
8142
8143
8144extern _Float64 remquof64 (_Float64 __x, _Float64 __y, int *__quo) __attribute__ ((__nothrow__ )); extern _Float64 __remquof64 (_Float64 __x, _Float64 __y, int *__quo) __attribute__ ((__nothrow__ ));
8145
8146
8147
8148
8149
8150
8151extern long int lrintf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern long int __lrintf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8152__extension__
8153extern long long int llrintf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern long long int __llrintf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8154
8155
8156
8157extern long int lroundf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern long int __lroundf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8158__extension__
8159extern long long int llroundf64 (_Float64 __x) __attribute__ ((__nothrow__ )); extern long long int __llroundf64 (_Float64 __x) __attribute__ ((__nothrow__ ));
8160
8161
8162
8163extern _Float64 fdimf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ )); extern _Float64 __fdimf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ ));
8164
8165
8166extern _Float64 fmaxf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64 __fmaxf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8167
8168
8169extern _Float64 fminf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64 __fminf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8170
8171
8172extern _Float64 fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) __attribute__ ((__nothrow__ )); extern _Float64 __fmaf64 (_Float64 __x, _Float64 __y, _Float64 __z) __attribute__ ((__nothrow__ ));
8173
8174
8175
8176
8177extern _Float64 roundevenf64 (_Float64 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64 __roundevenf64 (_Float64 __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8178
8179
8180
8181extern __intmax_t fromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __intmax_t __fromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
8182
8183
8184
8185
8186extern __uintmax_t ufromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __uintmax_t __ufromfpf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
8187
8188
8189
8190
8191
8192extern __intmax_t fromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __intmax_t __fromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
8193
8194
8195
8196
8197
8198extern __uintmax_t ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __uintmax_t __ufromfpxf64 (_Float64 __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
8199
8200
8201
8202extern _Float64 fmaxmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64 __fmaxmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8203
8204
8205extern _Float64 fminmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64 __fminmagf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8206
8207
8208extern int canonicalizef64 (_Float64 *__cx, const _Float64 *__x) __attribute__ ((__nothrow__ ));
8209
8210
8211
8212
8213extern int totalorderf64 (const _Float64 *__x, const _Float64 *__y) __attribute__ ((__nothrow__ ))
8214
8215 __attribute__ ((__pure__));
8216
8217
8218extern int totalordermagf64 (const _Float64 *__x, const _Float64 *__y) __attribute__ ((__nothrow__ ))
8219
8220 __attribute__ ((__pure__));
8221
8222
8223extern _Float64 getpayloadf64 (const _Float64 *__x) __attribute__ ((__nothrow__ )); extern _Float64 __getpayloadf64 (const _Float64 *__x) __attribute__ ((__nothrow__ ));
8224
8225
8226extern int setpayloadf64 (_Float64 *__x, _Float64 __payload) __attribute__ ((__nothrow__ ));
8227
8228
8229extern int setpayloadsigf64 (_Float64 *__x, _Float64 __payload) __attribute__ ((__nothrow__ ));
8230
8231
8232
8233
8234
8235
8236extern _Float32x acosf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __acosf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8237
8238extern _Float32x asinf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __asinf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8239
8240extern _Float32x atanf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __atanf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8241
8242extern _Float32x atan2f32x (_Float32x __y, _Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __atan2f32x (_Float32x __y, _Float32x __x) __attribute__ ((__nothrow__ ));
8243
8244
8245 extern _Float32x cosf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __cosf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8246
8247 extern _Float32x sinf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __sinf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8248
8249extern _Float32x tanf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __tanf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8250
8251
8252
8253
8254extern _Float32x coshf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __coshf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8255
8256extern _Float32x sinhf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __sinhf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8257
8258extern _Float32x tanhf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __tanhf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8259
8260
8261
8262 extern void sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) __attribute__ ((__nothrow__ )); extern void __sincosf32x (_Float32x __x, _Float32x *__sinx, _Float32x *__cosx) __attribute__ ((__nothrow__ ));
8263
8264
8265
8266
8267
8268extern _Float32x acoshf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __acoshf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8269
8270extern _Float32x asinhf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __asinhf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8271
8272extern _Float32x atanhf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __atanhf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8273
8274
8275
8276
8277
8278 extern _Float32x expf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __expf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8279
8280
8281extern _Float32x frexpf32x (_Float32x __x, int *__exponent) __attribute__ ((__nothrow__ )); extern _Float32x __frexpf32x (_Float32x __x, int *__exponent) __attribute__ ((__nothrow__ ));
8282
8283
8284extern _Float32x ldexpf32x (_Float32x __x, int __exponent) __attribute__ ((__nothrow__ )); extern _Float32x __ldexpf32x (_Float32x __x, int __exponent) __attribute__ ((__nothrow__ ));
8285
8286
8287 extern _Float32x logf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __logf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8288
8289
8290extern _Float32x log10f32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __log10f32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8291
8292
8293extern _Float32x modff32x (_Float32x __x, _Float32x *__iptr) __attribute__ ((__nothrow__ )); extern _Float32x __modff32x (_Float32x __x, _Float32x *__iptr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
8294
8295
8296
8297extern _Float32x exp10f32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __exp10f32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8298
8299
8300
8301
8302extern _Float32x expm1f32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __expm1f32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8303
8304
8305extern _Float32x log1pf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __log1pf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8306
8307
8308extern _Float32x logbf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __logbf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8309
8310
8311
8312
8313extern _Float32x exp2f32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __exp2f32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8314
8315
8316extern _Float32x log2f32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __log2f32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8317
8318
8319
8320
8321
8322
8323 extern _Float32x powf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ )); extern _Float32x __powf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ ));
8324
8325
8326extern _Float32x sqrtf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __sqrtf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8327
8328
8329
8330extern _Float32x hypotf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ )); extern _Float32x __hypotf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ ));
8331
8332
8333
8334
8335extern _Float32x cbrtf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __cbrtf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8336
8337
8338
8339
8340
8341
8342extern _Float32x ceilf32x (_Float32x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32x __ceilf32x (_Float32x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8343
8344
8345extern _Float32x fabsf32x (_Float32x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32x __fabsf32x (_Float32x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8346
8347
8348extern _Float32x floorf32x (_Float32x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32x __floorf32x (_Float32x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8349
8350
8351extern _Float32x fmodf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ )); extern _Float32x __fmodf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ ));
8352extern _Float32x copysignf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32x __copysignf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8353
8354
8355
8356
8357extern _Float32x nanf32x (const char *__tagb) __attribute__ ((__nothrow__ )); extern _Float32x __nanf32x (const char *__tagb) __attribute__ ((__nothrow__ ));
8358extern _Float32x j0f32x (_Float32x) __attribute__ ((__nothrow__ )); extern _Float32x __j0f32x (_Float32x) __attribute__ ((__nothrow__ ));
8359extern _Float32x j1f32x (_Float32x) __attribute__ ((__nothrow__ )); extern _Float32x __j1f32x (_Float32x) __attribute__ ((__nothrow__ ));
8360extern _Float32x jnf32x (int, _Float32x) __attribute__ ((__nothrow__ )); extern _Float32x __jnf32x (int, _Float32x) __attribute__ ((__nothrow__ ));
8361extern _Float32x y0f32x (_Float32x) __attribute__ ((__nothrow__ )); extern _Float32x __y0f32x (_Float32x) __attribute__ ((__nothrow__ ));
8362extern _Float32x y1f32x (_Float32x) __attribute__ ((__nothrow__ )); extern _Float32x __y1f32x (_Float32x) __attribute__ ((__nothrow__ ));
8363extern _Float32x ynf32x (int, _Float32x) __attribute__ ((__nothrow__ )); extern _Float32x __ynf32x (int, _Float32x) __attribute__ ((__nothrow__ ));
8364
8365
8366
8367
8368
8369extern _Float32x erff32x (_Float32x) __attribute__ ((__nothrow__ )); extern _Float32x __erff32x (_Float32x) __attribute__ ((__nothrow__ ));
8370extern _Float32x erfcf32x (_Float32x) __attribute__ ((__nothrow__ )); extern _Float32x __erfcf32x (_Float32x) __attribute__ ((__nothrow__ ));
8371extern _Float32x lgammaf32x (_Float32x) __attribute__ ((__nothrow__ )); extern _Float32x __lgammaf32x (_Float32x) __attribute__ ((__nothrow__ ));
8372
8373
8374
8375
8376extern _Float32x tgammaf32x (_Float32x) __attribute__ ((__nothrow__ )); extern _Float32x __tgammaf32x (_Float32x) __attribute__ ((__nothrow__ ));
8377extern _Float32x lgammaf32x_r (_Float32x, int *__signgamp) __attribute__ ((__nothrow__ )); extern _Float32x __lgammaf32x_r (_Float32x, int *__signgamp) __attribute__ ((__nothrow__ ));
8378
8379
8380
8381
8382
8383
8384extern _Float32x rintf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __rintf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8385
8386
8387extern _Float32x nextafterf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ )); extern _Float32x __nextafterf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ ));
8388
8389
8390
8391
8392
8393
8394extern _Float32x nextdownf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __nextdownf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8395
8396extern _Float32x nextupf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __nextupf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8397
8398
8399
8400extern _Float32x remainderf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ )); extern _Float32x __remainderf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ ));
8401
8402
8403
8404extern _Float32x scalbnf32x (_Float32x __x, int __n) __attribute__ ((__nothrow__ )); extern _Float32x __scalbnf32x (_Float32x __x, int __n) __attribute__ ((__nothrow__ ));
8405
8406
8407
8408extern int ilogbf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern int __ilogbf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8409
8410
8411
8412
8413extern long int llogbf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern long int __llogbf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8414
8415
8416
8417
8418extern _Float32x scalblnf32x (_Float32x __x, long int __n) __attribute__ ((__nothrow__ )); extern _Float32x __scalblnf32x (_Float32x __x, long int __n) __attribute__ ((__nothrow__ ));
8419
8420
8421
8422extern _Float32x nearbyintf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern _Float32x __nearbyintf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8423
8424
8425
8426extern _Float32x roundf32x (_Float32x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32x __roundf32x (_Float32x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8427
8428
8429
8430extern _Float32x truncf32x (_Float32x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32x __truncf32x (_Float32x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8431
8432
8433
8434
8435extern _Float32x remquof32x (_Float32x __x, _Float32x __y, int *__quo) __attribute__ ((__nothrow__ )); extern _Float32x __remquof32x (_Float32x __x, _Float32x __y, int *__quo) __attribute__ ((__nothrow__ ));
8436
8437
8438
8439
8440
8441
8442extern long int lrintf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern long int __lrintf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8443__extension__
8444extern long long int llrintf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern long long int __llrintf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8445
8446
8447
8448extern long int lroundf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern long int __lroundf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8449__extension__
8450extern long long int llroundf32x (_Float32x __x) __attribute__ ((__nothrow__ )); extern long long int __llroundf32x (_Float32x __x) __attribute__ ((__nothrow__ ));
8451
8452
8453
8454extern _Float32x fdimf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ )); extern _Float32x __fdimf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ ));
8455
8456
8457extern _Float32x fmaxf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32x __fmaxf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8458
8459
8460extern _Float32x fminf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32x __fminf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8461
8462
8463extern _Float32x fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) __attribute__ ((__nothrow__ )); extern _Float32x __fmaf32x (_Float32x __x, _Float32x __y, _Float32x __z) __attribute__ ((__nothrow__ ));
8464
8465
8466
8467
8468extern _Float32x roundevenf32x (_Float32x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32x __roundevenf32x (_Float32x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8469
8470
8471
8472extern __intmax_t fromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __intmax_t __fromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
8473
8474
8475
8476
8477extern __uintmax_t ufromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __uintmax_t __ufromfpf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
8478
8479
8480
8481
8482
8483extern __intmax_t fromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __intmax_t __fromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
8484
8485
8486
8487
8488
8489extern __uintmax_t ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __uintmax_t __ufromfpxf32x (_Float32x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
8490
8491
8492
8493extern _Float32x fmaxmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32x __fmaxmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8494
8495
8496extern _Float32x fminmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float32x __fminmagf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8497
8498
8499extern int canonicalizef32x (_Float32x *__cx, const _Float32x *__x) __attribute__ ((__nothrow__ ));
8500
8501
8502
8503
8504extern int totalorderf32x (const _Float32x *__x, const _Float32x *__y) __attribute__ ((__nothrow__ ))
8505
8506 __attribute__ ((__pure__));
8507
8508
8509extern int totalordermagf32x (const _Float32x *__x, const _Float32x *__y) __attribute__ ((__nothrow__ ))
8510
8511 __attribute__ ((__pure__));
8512
8513
8514extern _Float32x getpayloadf32x (const _Float32x *__x) __attribute__ ((__nothrow__ )); extern _Float32x __getpayloadf32x (const _Float32x *__x) __attribute__ ((__nothrow__ ));
8515
8516
8517extern int setpayloadf32x (_Float32x *__x, _Float32x __payload) __attribute__ ((__nothrow__ ));
8518
8519
8520extern int setpayloadsigf32x (_Float32x *__x, _Float32x __payload) __attribute__ ((__nothrow__ ));
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530extern _Float64x acosf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __acosf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8531
8532extern _Float64x asinf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __asinf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8533
8534extern _Float64x atanf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __atanf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8535
8536extern _Float64x atan2f64x (_Float64x __y, _Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __atan2f64x (_Float64x __y, _Float64x __x) __attribute__ ((__nothrow__ ));
8537
8538
8539 extern _Float64x cosf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __cosf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8540
8541 extern _Float64x sinf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __sinf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8542
8543extern _Float64x tanf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __tanf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8544
8545
8546
8547
8548extern _Float64x coshf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __coshf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8549
8550extern _Float64x sinhf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __sinhf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8551
8552extern _Float64x tanhf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __tanhf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8553
8554
8555
8556 extern void sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) __attribute__ ((__nothrow__ )); extern void __sincosf64x (_Float64x __x, _Float64x *__sinx, _Float64x *__cosx) __attribute__ ((__nothrow__ ));
8557
8558
8559
8560
8561
8562extern _Float64x acoshf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __acoshf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8563
8564extern _Float64x asinhf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __asinhf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8565
8566extern _Float64x atanhf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __atanhf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8567
8568
8569
8570
8571
8572 extern _Float64x expf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __expf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8573
8574
8575extern _Float64x frexpf64x (_Float64x __x, int *__exponent) __attribute__ ((__nothrow__ )); extern _Float64x __frexpf64x (_Float64x __x, int *__exponent) __attribute__ ((__nothrow__ ));
8576
8577
8578extern _Float64x ldexpf64x (_Float64x __x, int __exponent) __attribute__ ((__nothrow__ )); extern _Float64x __ldexpf64x (_Float64x __x, int __exponent) __attribute__ ((__nothrow__ ));
8579
8580
8581 extern _Float64x logf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __logf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8582
8583
8584extern _Float64x log10f64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __log10f64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8585
8586
8587extern _Float64x modff64x (_Float64x __x, _Float64x *__iptr) __attribute__ ((__nothrow__ )); extern _Float64x __modff64x (_Float64x __x, _Float64x *__iptr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
8588
8589
8590
8591extern _Float64x exp10f64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __exp10f64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8592
8593
8594
8595
8596extern _Float64x expm1f64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __expm1f64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8597
8598
8599extern _Float64x log1pf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __log1pf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8600
8601
8602extern _Float64x logbf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __logbf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8603
8604
8605
8606
8607extern _Float64x exp2f64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __exp2f64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8608
8609
8610extern _Float64x log2f64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __log2f64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8611
8612
8613
8614
8615
8616
8617 extern _Float64x powf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ )); extern _Float64x __powf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ ));
8618
8619
8620extern _Float64x sqrtf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __sqrtf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8621
8622
8623
8624extern _Float64x hypotf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ )); extern _Float64x __hypotf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ ));
8625
8626
8627
8628
8629extern _Float64x cbrtf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __cbrtf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8630
8631
8632
8633
8634
8635
8636extern _Float64x ceilf64x (_Float64x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64x __ceilf64x (_Float64x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8637
8638
8639extern _Float64x fabsf64x (_Float64x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64x __fabsf64x (_Float64x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8640
8641
8642extern _Float64x floorf64x (_Float64x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64x __floorf64x (_Float64x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8643
8644
8645extern _Float64x fmodf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ )); extern _Float64x __fmodf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ ));
8646extern _Float64x copysignf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64x __copysignf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8647
8648
8649
8650
8651extern _Float64x nanf64x (const char *__tagb) __attribute__ ((__nothrow__ )); extern _Float64x __nanf64x (const char *__tagb) __attribute__ ((__nothrow__ ));
8652extern _Float64x j0f64x (_Float64x) __attribute__ ((__nothrow__ )); extern _Float64x __j0f64x (_Float64x) __attribute__ ((__nothrow__ ));
8653extern _Float64x j1f64x (_Float64x) __attribute__ ((__nothrow__ )); extern _Float64x __j1f64x (_Float64x) __attribute__ ((__nothrow__ ));
8654extern _Float64x jnf64x (int, _Float64x) __attribute__ ((__nothrow__ )); extern _Float64x __jnf64x (int, _Float64x) __attribute__ ((__nothrow__ ));
8655extern _Float64x y0f64x (_Float64x) __attribute__ ((__nothrow__ )); extern _Float64x __y0f64x (_Float64x) __attribute__ ((__nothrow__ ));
8656extern _Float64x y1f64x (_Float64x) __attribute__ ((__nothrow__ )); extern _Float64x __y1f64x (_Float64x) __attribute__ ((__nothrow__ ));
8657extern _Float64x ynf64x (int, _Float64x) __attribute__ ((__nothrow__ )); extern _Float64x __ynf64x (int, _Float64x) __attribute__ ((__nothrow__ ));
8658
8659
8660
8661
8662
8663extern _Float64x erff64x (_Float64x) __attribute__ ((__nothrow__ )); extern _Float64x __erff64x (_Float64x) __attribute__ ((__nothrow__ ));
8664extern _Float64x erfcf64x (_Float64x) __attribute__ ((__nothrow__ )); extern _Float64x __erfcf64x (_Float64x) __attribute__ ((__nothrow__ ));
8665extern _Float64x lgammaf64x (_Float64x) __attribute__ ((__nothrow__ )); extern _Float64x __lgammaf64x (_Float64x) __attribute__ ((__nothrow__ ));
8666
8667
8668
8669
8670extern _Float64x tgammaf64x (_Float64x) __attribute__ ((__nothrow__ )); extern _Float64x __tgammaf64x (_Float64x) __attribute__ ((__nothrow__ ));
8671extern _Float64x lgammaf64x_r (_Float64x, int *__signgamp) __attribute__ ((__nothrow__ )); extern _Float64x __lgammaf64x_r (_Float64x, int *__signgamp) __attribute__ ((__nothrow__ ));
8672
8673
8674
8675
8676
8677
8678extern _Float64x rintf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __rintf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8679
8680
8681extern _Float64x nextafterf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ )); extern _Float64x __nextafterf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ ));
8682
8683
8684
8685
8686
8687
8688extern _Float64x nextdownf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __nextdownf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8689
8690extern _Float64x nextupf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __nextupf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8691
8692
8693
8694extern _Float64x remainderf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ )); extern _Float64x __remainderf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ ));
8695
8696
8697
8698extern _Float64x scalbnf64x (_Float64x __x, int __n) __attribute__ ((__nothrow__ )); extern _Float64x __scalbnf64x (_Float64x __x, int __n) __attribute__ ((__nothrow__ ));
8699
8700
8701
8702extern int ilogbf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern int __ilogbf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8703
8704
8705
8706
8707extern long int llogbf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern long int __llogbf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8708
8709
8710
8711
8712extern _Float64x scalblnf64x (_Float64x __x, long int __n) __attribute__ ((__nothrow__ )); extern _Float64x __scalblnf64x (_Float64x __x, long int __n) __attribute__ ((__nothrow__ ));
8713
8714
8715
8716extern _Float64x nearbyintf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern _Float64x __nearbyintf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8717
8718
8719
8720extern _Float64x roundf64x (_Float64x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64x __roundf64x (_Float64x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8721
8722
8723
8724extern _Float64x truncf64x (_Float64x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64x __truncf64x (_Float64x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8725
8726
8727
8728
8729extern _Float64x remquof64x (_Float64x __x, _Float64x __y, int *__quo) __attribute__ ((__nothrow__ )); extern _Float64x __remquof64x (_Float64x __x, _Float64x __y, int *__quo) __attribute__ ((__nothrow__ ));
8730
8731
8732
8733
8734
8735
8736extern long int lrintf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern long int __lrintf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8737__extension__
8738extern long long int llrintf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern long long int __llrintf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8739
8740
8741
8742extern long int lroundf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern long int __lroundf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8743__extension__
8744extern long long int llroundf64x (_Float64x __x) __attribute__ ((__nothrow__ )); extern long long int __llroundf64x (_Float64x __x) __attribute__ ((__nothrow__ ));
8745
8746
8747
8748extern _Float64x fdimf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ )); extern _Float64x __fdimf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ ));
8749
8750
8751extern _Float64x fmaxf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64x __fmaxf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8752
8753
8754extern _Float64x fminf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64x __fminf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8755
8756
8757extern _Float64x fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) __attribute__ ((__nothrow__ )); extern _Float64x __fmaf64x (_Float64x __x, _Float64x __y, _Float64x __z) __attribute__ ((__nothrow__ ));
8758
8759
8760
8761
8762extern _Float64x roundevenf64x (_Float64x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64x __roundevenf64x (_Float64x __x) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8763
8764
8765
8766extern __intmax_t fromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __intmax_t __fromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
8767
8768
8769
8770
8771extern __uintmax_t ufromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __uintmax_t __ufromfpf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
8772
8773
8774
8775
8776
8777extern __intmax_t fromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __intmax_t __fromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
8778
8779
8780
8781
8782
8783extern __uintmax_t ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ )); extern __uintmax_t __ufromfpxf64x (_Float64x __x, int __round, unsigned int __width) __attribute__ ((__nothrow__ ));
8784
8785
8786
8787extern _Float64x fmaxmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64x __fmaxmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8788
8789
8790extern _Float64x fminmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__)); extern _Float64x __fminmagf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8791
8792
8793extern int canonicalizef64x (_Float64x *__cx, const _Float64x *__x) __attribute__ ((__nothrow__ ));
8794
8795
8796
8797
8798extern int totalorderf64x (const _Float64x *__x, const _Float64x *__y) __attribute__ ((__nothrow__ ))
8799
8800 __attribute__ ((__pure__));
8801
8802
8803extern int totalordermagf64x (const _Float64x *__x, const _Float64x *__y) __attribute__ ((__nothrow__ ))
8804
8805 __attribute__ ((__pure__));
8806
8807
8808extern _Float64x getpayloadf64x (const _Float64x *__x) __attribute__ ((__nothrow__ )); extern _Float64x __getpayloadf64x (const _Float64x *__x) __attribute__ ((__nothrow__ ));
8809
8810
8811extern int setpayloadf64x (_Float64x *__x, _Float64x __payload) __attribute__ ((__nothrow__ ));
8812
8813
8814extern int setpayloadsigf64x (_Float64x *__x, _Float64x __payload) __attribute__ ((__nothrow__ ));
8815
8816
8817
8818
8819
8820
8821
8822
8823
8824
8825
8826extern float fadd (double __x, double __y) __attribute__ ((__nothrow__ ));
8827
8828
8829extern float fdiv (double __x, double __y) __attribute__ ((__nothrow__ ));
8830
8831
8832extern float fmul (double __x, double __y) __attribute__ ((__nothrow__ ));
8833
8834
8835extern float fsub (double __x, double __y) __attribute__ ((__nothrow__ ));
8836
8837
8838
8839
8840
8841
8842
8843
8844extern float faddl (long double __x, long double __y) __attribute__ ((__nothrow__ ));
8845
8846
8847extern float fdivl (long double __x, long double __y) __attribute__ ((__nothrow__ ));
8848
8849
8850extern float fmull (long double __x, long double __y) __attribute__ ((__nothrow__ ));
8851
8852
8853extern float fsubl (long double __x, long double __y) __attribute__ ((__nothrow__ ));
8854
8855
8856
8857
8858
8859
8860
8861
8862
8863
8864
8865
8866
8867
8868extern double daddl (long double __x, long double __y) __attribute__ ((__nothrow__ ));
8869
8870
8871extern double ddivl (long double __x, long double __y) __attribute__ ((__nothrow__ ));
8872
8873
8874extern double dmull (long double __x, long double __y) __attribute__ ((__nothrow__ ));
8875
8876
8877extern double dsubl (long double __x, long double __y) __attribute__ ((__nothrow__ ));
8878
8879extern _Float32 f32addf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ ));
8880
8881
8882extern _Float32 f32divf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ ));
8883
8884
8885extern _Float32 f32mulf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ ));
8886
8887
8888extern _Float32 f32subf32x (_Float32x __x, _Float32x __y) __attribute__ ((__nothrow__ ));
8889
8890
8891
8892
8893extern _Float32 f32addf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ ));
8894
8895
8896extern _Float32 f32divf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ ));
8897
8898
8899extern _Float32 f32mulf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ ));
8900
8901
8902extern _Float32 f32subf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ ));
8903
8904
8905
8906
8907extern _Float32 f32addf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ ));
8908
8909
8910extern _Float32 f32divf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ ));
8911
8912
8913extern _Float32 f32mulf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ ));
8914
8915
8916extern _Float32 f32subf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ ));
8917
8918extern _Float32x f32xaddf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ ));
8919
8920
8921extern _Float32x f32xdivf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ ));
8922
8923
8924extern _Float32x f32xmulf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ ));
8925
8926
8927extern _Float32x f32xsubf64 (_Float64 __x, _Float64 __y) __attribute__ ((__nothrow__ ));
8928
8929
8930
8931
8932extern _Float32x f32xaddf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ ));
8933
8934
8935extern _Float32x f32xdivf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ ));
8936
8937
8938extern _Float32x f32xmulf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ ));
8939
8940
8941extern _Float32x f32xsubf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ ));
8942
8943extern _Float64 f64addf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ ));
8944
8945
8946extern _Float64 f64divf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ ));
8947
8948
8949extern _Float64 f64mulf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ ));
8950
8951
8952extern _Float64 f64subf64x (_Float64x __x, _Float64x __y) __attribute__ ((__nothrow__ ));
8953
8954
8955
8956extern int signgam;
8957enum
8958 {
8959 FP_NAN =
8960 0,
8961 FP_INFINITE =
8962 1,
8963 FP_ZERO =
8964 2,
8965 FP_SUBNORMAL =
8966 3,
8967 FP_NORMAL =
8968 4
8969 };
8970
8971
8972
8973
8974
8975
8976
8977
8978
8979
8980
8981
8982
8983
8984
8985
8986
8987
8988
8989
8990
8991
8992
8993
8994
8995extern int __iscanonicall (long double __x)
8996 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
8997
8998
8999
9000
9001
9002
9003
9004
9005
9006
9007
9008
9009
9010
9011
9012
9013
9014
9015
9016
9017
9018
9019
9020
9021
9022
9023
9024
9025
9026
9027
9028
9029
9030
9031
9032
9033
9034
9035
9036
9037
9038
9039
9040
9041
9042
9043
9044
9045
9046
9047
9048
9049
9050
9051
9052
9053
9054
9055
9056
9057
9058
9059
9060
9061
9062
9063
9064
9065
9066
9067
9068
9069
9070
9071
9072
9073
9074
9075
9076
9077
9078
9079
9080struct timex
9081{
9082 unsigned int modes;
9083 __syscall_slong_t offset;
9084 __syscall_slong_t freq;
9085 __syscall_slong_t maxerror;
9086 __syscall_slong_t esterror;
9087 int status;
9088 __syscall_slong_t constant;
9089 __syscall_slong_t precision;
9090 __syscall_slong_t tolerance;
9091 struct timeval time;
9092 __syscall_slong_t tick;
9093 __syscall_slong_t ppsfreq;
9094 __syscall_slong_t jitter;
9095 int shift;
9096 __syscall_slong_t stabil;
9097 __syscall_slong_t jitcnt;
9098 __syscall_slong_t calcnt;
9099 __syscall_slong_t errcnt;
9100 __syscall_slong_t stbcnt;
9101
9102 int tai;
9103
9104
9105 int :32; int :32; int :32; int :32;
9106 int :32; int :32; int :32; int :32;
9107 int :32; int :32; int :32;
9108};
9109
9110
9111
9112
9113
9114
9115
9116
9117
9118
9119
9120
9121
9122
9123
9124
9125extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __attribute__ ((__nothrow__ ));
9126
9127
9128
9129
9130
9131
9132
9133
9134
9135
9136struct tm
9137{
9138 int tm_sec;
9139 int tm_min;
9140 int tm_hour;
9141 int tm_mday;
9142 int tm_mon;
9143 int tm_year;
9144 int tm_wday;
9145 int tm_yday;
9146 int tm_isdst;
9147
9148
9149 long int tm_gmtoff;
9150 const char *tm_zone;
9151
9152
9153
9154
9155};
9156
9157
9158
9159
9160
9161
9162
9163
9164
9165
9166
9167
9168
9169
9170struct itimerspec
9171 {
9172 struct timespec it_interval;
9173 struct timespec it_value;
9174 };
9175struct sigevent;
9176
9177
9178
9179
9180
9181
9182extern clock_t clock (void) __attribute__ ((__nothrow__ ));
9183
9184
9185extern time_t time (time_t *__timer) __attribute__ ((__nothrow__ ));
9186
9187
9188extern double difftime (time_t __time1, time_t __time0)
9189 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
9190
9191
9192extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__ ));
9193
9194
9195
9196
9197
9198extern size_t strftime (char *__restrict __s, size_t __maxsize,
9199 const char *__restrict __format,
9200 const struct tm *__restrict __tp) __attribute__ ((__nothrow__ ));
9201
9202
9203
9204
9205extern char *strptime (const char *__restrict __s,
9206 const char *__restrict __fmt, struct tm *__tp)
9207 __attribute__ ((__nothrow__ ));
9208
9209
9210
9211
9212
9213
9214extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
9215 const char *__restrict __format,
9216 const struct tm *__restrict __tp,
9217 locale_t __loc) __attribute__ ((__nothrow__ ));
9218
9219
9220
9221extern char *strptime_l (const char *__restrict __s,
9222 const char *__restrict __fmt, struct tm *__tp,
9223 locale_t __loc) __attribute__ ((__nothrow__ ));
9224
9225
9226
9227
9228
9229extern struct tm *gmtime (const time_t *__timer) __attribute__ ((__nothrow__ ));
9230
9231
9232
9233extern struct tm *localtime (const time_t *__timer) __attribute__ ((__nothrow__ ));
9234
9235
9236
9237
9238extern struct tm *gmtime_r (const time_t *__restrict __timer,
9239 struct tm *__restrict __tp) __attribute__ ((__nothrow__ ));
9240
9241
9242
9243extern struct tm *localtime_r (const time_t *__restrict __timer,
9244 struct tm *__restrict __tp) __attribute__ ((__nothrow__ ));
9245
9246
9247
9248
9249extern char *asctime (const struct tm *__tp) __attribute__ ((__nothrow__ ));
9250
9251
9252extern char *ctime (const time_t *__timer) __attribute__ ((__nothrow__ ));
9253
9254
9255
9256
9257
9258
9259extern char *asctime_r (const struct tm *__restrict __tp,
9260 char *__restrict __buf) __attribute__ ((__nothrow__ ));
9261
9262
9263extern char *ctime_r (const time_t *__restrict __timer,
9264 char *__restrict __buf) __attribute__ ((__nothrow__ ));
9265
9266
9267
9268
9269extern char *__tzname[2];
9270extern int __daylight;
9271extern long int __timezone;
9272
9273
9274
9275
9276extern char *tzname[2];
9277
9278
9279
9280extern void tzset (void) __attribute__ ((__nothrow__ ));
9281
9282
9283
9284extern int daylight;
9285extern long int timezone;
9286
9287
9288
9289
9290
9291
9292
9293
9294
9295
9296
9297
9298
9299extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__ ));
9300
9301
9302extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__ ));
9303
9304
9305extern int dysize (int __year) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
9306extern int nanosleep (const struct timespec *__requested_time,
9307 struct timespec *__remaining);
9308
9309
9310
9311extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__ ));
9312
9313
9314extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__ ));
9315
9316
9317extern int clock_settime (clockid_t __clock_id, const struct timespec *__tp)
9318 __attribute__ ((__nothrow__ ));
9319
9320
9321
9322
9323
9324
9325extern int clock_nanosleep (clockid_t __clock_id, int __flags,
9326 const struct timespec *__req,
9327 struct timespec *__rem);
9328
9329
9330extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__ ));
9331
9332
9333
9334
9335extern int timer_create (clockid_t __clock_id,
9336 struct sigevent *__restrict __evp,
9337 timer_t *__restrict __timerid) __attribute__ ((__nothrow__ ));
9338
9339
9340extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__ ));
9341
9342
9343extern int timer_settime (timer_t __timerid, int __flags,
9344 const struct itimerspec *__restrict __value,
9345 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__ ));
9346
9347
9348extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
9349 __attribute__ ((__nothrow__ ));
9350
9351
9352extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__ ));
9353
9354
9355
9356
9357
9358extern int timespec_get (struct timespec *__ts, int __base)
9359 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
9360extern int getdate_err;
9361extern struct tm *getdate (const char *__string);
9362extern int getdate_r (const char *__restrict __string,
9363 struct tm *__restrict __resbufp);
9364
9365
9366
9367
9368
9369
9371 {
9372 int tz_minuteswest;
9373 int tz_dsttime;
9374 };
9375extern int gettimeofday (struct timeval *__restrict __tv,
9376 void *__restrict __tz) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
9377
9378
9379
9380
9381
9382
9383
9384extern int settimeofday (const struct timeval *__tv,
9385 const struct timezone *__tz)
9386 __attribute__ ((__nothrow__ ));
9387
9388
9389
9390
9391
9392extern int adjtime (const struct timeval *__delta,
9393 struct timeval *__olddelta) __attribute__ ((__nothrow__ ));
9394
9395
9396
9397
9398enum __itimer_which
9399 {
9400
9401 ITIMER_REAL = 0,
9402
9403 ITIMER_VIRTUAL = 1,
9404
9405
9406 ITIMER_PROF = 2
9407 };
9408
9409
9410
9412 {
9413
9414 struct timeval it_interval;
9415
9416 struct timeval it_value;
9417 };
9418
9419
9420
9421
9422typedef enum __itimer_which __itimer_which_t;
9423
9424
9425
9426
9427
9428
9429extern int getitimer (__itimer_which_t __which,
9430 struct itimerval *__value) __attribute__ ((__nothrow__ ));
9431
9432
9433
9434
9435extern int setitimer (__itimer_which_t __which,
9436 const struct itimerval *__restrict __new,
9437 struct itimerval *__restrict __old) __attribute__ ((__nothrow__ ));
9438
9439
9440
9441
9442extern int utimes (const char *__file, const struct timeval __tvp[2])
9443 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
9444
9445
9446
9447extern int lutimes (const char *__file, const struct timeval __tvp[2])
9448 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
9449
9450
9451extern int futimes (int __fd, const struct timeval __tvp[2]) __attribute__ ((__nothrow__ ));
9452
9453
9454
9455
9456
9457
9458extern int futimesat (int __fd, const char *__file,
9459 const struct timeval __tvp[2]) __attribute__ ((__nothrow__ ));
9460
9461
9462
9463
9464
9465
9466
9467
9468
9469extern size_t strlcpy(char *, const char*, size_t);
9470
9471
9472
9473extern size_t strlcat(char *, const char*, size_t);
9474extern void setproctitle(const char *fmt, ...);
9475
9476
9477
9478
9479
9480
9481
9482
9483
9484
9485
9486
9487
9488
9489
9490
9491
9492
9493
9494
9495
9496
9497
9498
9499
9500
9501
9502
9503
9504
9505
9506
9507
9508
9509
9510
9511
9512
9513
9514
9515
9516
9517
9518
9519
9520
9521
9522
9523
9524
9525
9526
9527
9528
9529
9530
9531
9532
9533
9534
9535
9536
9537
9538
9539
9540
9541
9542
9543
9544
9545
9546
9547
9548
9549
9550
9551
9552
9553
9554
9555
9556
9557
9558
9559
9560
9561
9562
9563
9564
9565
9566
9567
9568
9569
9570
9571
9572
9573
9574
9575
9576
9577
9578
9579
9580
9581
9582
9583
9584
9585
9586
9587
9588
9589
9590
9591
9592
9593
9594
9595
9596
9597
9598
9599
9600
9601
9602
9603
9604
9605
9606
9607
9608
9609
9610
9611
9612
9613
9614
9615
9616
9617
9618
9619
9620
9621
9622
9623
9624
9625
9626
9627
9628
9629
9630
9631
9632
9633
9634
9635
9636
9637
9638
9639
9640
9641
9642
9643
9644
9645
9646
9647
9648
9649
9650
9651
9652
9653
9654
9655
9656
9657
9658
9659
9660
9661
9662
9663
9664
9665
9666
9667
9668
9669
9670
9671
9672
9673
9674
9675
9676
9677
9678
9679
9680
9681
9682
9683
9684
9685
9686
9687
9688
9689
9690
9691
9692
9693
9694
9695
9696
9697
9698
9699
9700
9701
9702
9703
9704
9705
9706
9707
9708
9709
9710
9711
9712
9713
9714
9715
9716
9717
9718
9719
9720
9721
9722
9723
9724
9725
9726
9727
9728
9729
9730
9731
9732
9733
9734
9735
9736
9737
9738
9739
9740
9741
9742
9743
9744
9745
9746
9747
9748
9749
9750
9751
9752
9753
9754
9755
9756
9757
9758
9759
9760
9761
9762
9763
9764
9765
9766
9767
9768
9769
9770
9771
9772
9773
9774
9775
9776
9777
9778
9779
9780
9781
9782
9783
9784
9785
9786
9787
9788
9789
9790
9791
9792
9793
9794
9795
9796
9797
9798
9799
9800
9801
9802
9803
9804
9805
9806
9807
9808
9809
9810
9811
9812
9813
9814
9815
9816
9817
9818
9819
9820
9821
9822
9823
9824
9825
9826
9827
9828
9829
9830
9831
9832
9833
9834
9835
9836
9837
9838
9839
9840
9841
9842
9843typedef unsigned long VALUE;
9844typedef unsigned long ID;
9845__extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (4 == sizeof(int)) ? 2 : -1; })];
9846__extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (8 == sizeof(long)) ? 2 : -1; })];
9847__extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (8 == sizeof(
9848 long long
9849)) ? 2 : -1; })];
9850__extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (8 == sizeof(void *)) ? 2 : -1; })];
9851
9852
9853
9854
9855VALUE rb_class_new(VALUE);
9856VALUE rb_mod_init_copy(VALUE, VALUE);
9857VALUE rb_singleton_class_clone(VALUE);
9858void rb_singleton_class_attached(VALUE,VALUE);
9859void rb_check_inheritable(VALUE);
9860VALUE rb_define_class_id(ID, VALUE);
9861VALUE rb_define_class_id_under(VALUE, ID, VALUE);
9862VALUE rb_module_new(void);
9863VALUE rb_define_module_id(ID);
9864VALUE rb_define_module_id_under(VALUE, ID);
9865VALUE rb_mod_included_modules(VALUE);
9866VALUE rb_mod_include_p(VALUE, VALUE);
9867VALUE rb_mod_ancestors(VALUE);
9868VALUE rb_class_instance_methods(int, const VALUE*, VALUE);
9869VALUE rb_class_public_instance_methods(int, const VALUE*, VALUE);
9870VALUE rb_class_protected_instance_methods(int, const VALUE*, VALUE);
9871VALUE rb_class_private_instance_methods(int, const VALUE*, VALUE);
9872VALUE rb_obj_singleton_methods(int, const VALUE*, VALUE);
9873void rb_define_method_id(VALUE, ID, VALUE (*)(), int);
9874void rb_undef(VALUE, ID);
9875void rb_define_protected_method(VALUE, const char*, VALUE (*)(), int);
9876void rb_define_private_method(VALUE, const char*, VALUE (*)(), int);
9877void rb_define_singleton_method(VALUE, const char*, VALUE(*)(), int);
9878VALUE rb_singleton_class(VALUE);
9879
9880
9881
9882
9883int rb_sourceline(void);
9884const char *rb_sourcefile(void);
9885int rb_frame_method_id_and_class(ID *idp, VALUE *klassp);
9886
9887
9888VALUE rb_check_funcall(VALUE, ID, int, const VALUE*);
9889VALUE rb_check_funcall_kw(VALUE, ID, int, const VALUE*, int);
9890void rb_remove_method(VALUE, const char*);
9891void rb_remove_method_id(VALUE, ID);
9892
9893VALUE rb_eval_cmd_kw(VALUE, VALUE, int);
9894VALUE rb_apply(VALUE, ID, VALUE);
9895
9896VALUE rb_obj_instance_eval(int, const VALUE*, VALUE);
9897VALUE rb_obj_instance_exec(int, const VALUE*, VALUE);
9898VALUE rb_mod_module_eval(int, const VALUE*, VALUE);
9899VALUE rb_mod_module_exec(int, const VALUE*, VALUE);
9900
9901
9902typedef VALUE (*rb_alloc_func_t)(VALUE);
9904void rb_undef_alloc_func(VALUE);
9906void rb_clear_constant_cache(void);
9907void rb_clear_method_cache_by_class(VALUE);
9908void rb_alias(VALUE, ID, ID);
9909void rb_attr(VALUE,ID,int,int,int);
9910int rb_method_boundp(VALUE, ID, int);
9911int rb_method_basic_definition_p(VALUE, ID);
9912
9913int rb_obj_respond_to(VALUE, ID, int);
9914int rb_respond_to(VALUE, ID);
9915
9916__declspec(noreturn)
9917VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker);
9918
9919
9920
9921
9922
9923
9924void rb_backtrace(void);
9925VALUE rb_make_backtrace(void);
9926
9927
9928
9929void rb_define_method(VALUE,const char*,VALUE(*)(),int);
9930void rb_define_module_function(VALUE,const char*,VALUE(*)(),int);
9931void rb_define_global_function(const char*,VALUE(*)(),int);
9932
9933void rb_undef_method(VALUE,const char*);
9934void rb_define_alias(VALUE,const char*,const char*);
9935void rb_define_attr(VALUE,const char*,int,int);
9936
9937
9938
9939
9940
9941
9942
9943
9944__attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_m3(VALUE, const char *, VALUE(*)(), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_00(VALUE, const char *, VALUE(*)(VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_singleton_method"))) static void rb_define_singleton_method_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
9945__attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_m3(VALUE, const char *, VALUE(*)(), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_00(VALUE, const char *, VALUE(*)(VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_protected_method"))) static void rb_define_protected_method_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
9946__attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_m3(VALUE, const char *, VALUE(*)(), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_00(VALUE, const char *, VALUE(*)(VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_private_method"))) static void rb_define_private_method_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
9947__attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_m3(VALUE, const char *, VALUE(*)(), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_00(VALUE, const char *, VALUE(*)(VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_module_function"))) static void rb_define_module_function_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
9948__attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_m3(const char *, VALUE(*)(), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_m2(const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_m1(const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_00(const char *, VALUE(*)(VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_01(const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_02(const char *, VALUE(*)(VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_03(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_04(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_05(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_06(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_07(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_08(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_09(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_10(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_11(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_12(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_13(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_14(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_global_function"))) static void rb_define_global_function_15(const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
9949__attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_m3(VALUE, ID, VALUE(*)(), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_m2(VALUE, ID, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_m1(VALUE, ID, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_00(VALUE, ID, VALUE(*)(VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_01(VALUE, ID, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_02(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_03(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_04(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_05(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_06(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_07(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_08(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_09(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_10(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_11(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_12(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_13(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_14(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method_id"))) static void rb_define_method_id_15(VALUE, ID, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
9950__attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_m3(VALUE, const char *, VALUE(*)(), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_m2(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_m1(VALUE, const char *, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_00(VALUE, const char *, VALUE(*)(VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_01(VALUE, const char *, VALUE(*)(VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_02(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_03(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_04(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_05(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_06(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_07(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_08(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_09(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_10(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_11(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_12(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_13(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_14(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); __attribute__((__unused__)) __attribute__((__nonnull__ )) __attribute__((__weakref__("rb_define_method"))) static void rb_define_method_15(VALUE, const char *, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
9951
9952
9953
9954
9955
9956
9957VALUE rb_int2big(intptr_t i);
9958VALUE rb_int2inum(intptr_t i);
9959VALUE rb_uint2big(uintptr_t i);
9960VALUE rb_uint2inum(uintptr_t i);
9961
9962
9963
9964
9965
9966
9967
9968
9969
9970
9971
9972
9973
9974
9975
9976
9977
9978
9979
9980
9981
9982
9983
9984
9985
9986
9987
9988
9989
9990
9991
9992
9993enum
9994__attribute__((__enum_extensibility__(closed)))
9995ruby_special_consts {
9996
9997 RUBY_Qfalse = 0x00,
9998 RUBY_Qtrue = 0x14,
9999 RUBY_Qnil = 0x08,
10000 RUBY_Qundef = 0x34,
10001 RUBY_IMMEDIATE_MASK = 0x07,
10002 RUBY_FIXNUM_FLAG = 0x01,
10003 RUBY_FLONUM_MASK = 0x03,
10004 RUBY_FLONUM_FLAG = 0x02,
10005 RUBY_SYMBOL_FLAG = 0x0c,
10007};
10008
10009__attribute__((__const__))
10010
10011__attribute__((__artificial__))
10012
10013
10014
10015
10016static inline _Bool
10017RB_TEST(VALUE obj)
10018{
10019 return obj & ~RUBY_Qnil;
10020}
10021
10022__attribute__((__const__))
10023
10024__attribute__((__artificial__))
10025static inline _Bool
10026RB_NIL_P(VALUE obj)
10027{
10028 return obj == RUBY_Qnil;
10029}
10030
10031__attribute__((__const__))
10032
10033__attribute__((__artificial__))
10034static inline _Bool
10035RB_FIXNUM_P(VALUE obj)
10036{
10037 return obj & RUBY_FIXNUM_FLAG;
10038}
10039
10040__attribute__((__const__))
10041
10042__attribute__((__artificial__))
10043static inline _Bool
10044RB_STATIC_SYM_P(VALUE obj)
10045{
10046
10047 const VALUE mask = ~((9223372036854775807L *2UL+1UL) << RUBY_SPECIAL_SHIFT);
10048 return (obj & mask) == RUBY_SYMBOL_FLAG;
10049}
10050
10051__attribute__((__const__))
10052
10053__attribute__((__artificial__))
10054static inline _Bool
10055RB_FLONUM_P(VALUE obj)
10056{
10057
10058 return (obj & RUBY_FLONUM_MASK) == RUBY_FLONUM_FLAG;
10059
10060
10061
10062}
10063
10064__attribute__((__const__))
10065
10066__attribute__((__artificial__))
10067static inline _Bool
10068RB_IMMEDIATE_P(VALUE obj)
10069{
10070 return obj & RUBY_IMMEDIATE_MASK;
10071}
10072
10073__attribute__((__const__))
10074
10075__attribute__((__artificial__))
10076static inline _Bool
10077RB_SPECIAL_CONST_P(VALUE obj)
10078{
10079 return RB_IMMEDIATE_P(obj) || ! RB_TEST(obj);
10080}
10081
10082__attribute__((__const__))
10083
10084
10085
10086static inline VALUE
10087rb_special_const_p(VALUE obj)
10088{
10089 return RB_SPECIAL_CONST_P(obj) * RUBY_Qtrue;
10090}
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104__declspec(noreturn)
10105__attribute__((__cold__))
10106void rb_out_of_int(long num);
10107
10108long rb_num2long(VALUE num);
10109unsigned long rb_num2ulong(VALUE num);
10110
10111__attribute__((__const__))
10112
10113__attribute__((__artificial__))
10114static inline VALUE
10115RB_INT2FIX(long i)
10116{
10117 ((void)0);
10118
10119
10120
10121 const unsigned long j = i;
10122 const unsigned long k = 2 * j + RUBY_FIXNUM_FLAG;
10123 const long l = k;
10124 const long m = l;
10125 const VALUE n = m;
10126
10127 ((void)0);
10128 return n;
10129}
10130
10131static inline int
10132rb_long2int_inline(long n)
10133{
10134 int i = ((int)n);
10135
10136 if (sizeof(long) <= sizeof(int)) {
10137 __builtin_assume(i == n);
10138 }
10139
10140 if (i != n)
10141 rb_out_of_int(n);
10142
10143 return i;
10144}
10145
10146__attribute__((__const__))
10147
10148static inline long
10149rbimpl_fix2long_by_idiv(VALUE x)
10150{
10151 ((void)0);
10152
10153
10154
10155
10156 const long y = x - RUBY_FIXNUM_FLAG;
10157 const long z = y / 2;
10158 const long w = ((long)z);
10159
10160 ((void)0);
10161 return w;
10162}
10163
10164__attribute__((__const__))
10165
10166static inline long
10167rbimpl_fix2long_by_shift(VALUE x)
10168{
10169 ((void)0);
10170
10171
10172
10173 const long y = x;
10174 const long z = y >> 1;
10175 const long w = ((long)z);
10176
10177 ((void)0);
10178 return w;
10179}
10180
10181__attribute__((__const__))
10182
10183static inline _Bool
10184rbimpl_right_shift_is_arithmetic_p(void)
10185{
10186 return (-1 >> 1) == -1;
10187}
10188
10189__attribute__((__const__))
10190
10191static inline long
10192rb_fix2long(VALUE x)
10193{
10194 if (rbimpl_right_shift_is_arithmetic_p()) {
10195 return rbimpl_fix2long_by_shift(x);
10196 }
10197 else {
10198 return rbimpl_fix2long_by_idiv(x);
10199 }
10200}
10201
10202__attribute__((__const__))
10203
10204static inline unsigned long
10205rb_fix2ulong(VALUE x)
10206{
10207 ((void)0);
10208 return rb_fix2long(x);
10209}
10210
10211static inline long
10212rb_num2long_inline(VALUE x)
10213{
10214 if (RB_FIXNUM_P(x))
10215 return rb_fix2long(x);
10216 else
10217 return rb_num2long(x);
10218}
10219
10220static inline unsigned long
10221rb_num2ulong_inline(VALUE x)
10222{
10223
10224
10225
10226
10227
10228 if (RB_FIXNUM_P(x))
10229 return rb_fix2ulong(x);
10230 else
10231 return rb_num2ulong(x);
10232}
10233
10234static inline VALUE
10235rb_long2num_inline(long v)
10236{
10237 if ((((v) < (9223372036854775807L / 2) + 1) && ((v) >= ((-9223372036854775807L -1L) / 2))))
10238 return RB_INT2FIX(v);
10239 else
10240 return rb_int2big(v);
10241}
10242
10243static inline VALUE
10244rb_ulong2num_inline(unsigned long v)
10245{
10246 if (((v) < (9223372036854775807L / 2) + 1))
10247 return RB_INT2FIX(v);
10248 else
10249 return rb_uint2big(v);
10250}
10251
10252
10253
10254
10255
10256long rb_num2int(VALUE);
10257long rb_fix2int(VALUE);
10258unsigned long rb_num2uint(VALUE);
10259unsigned long rb_fix2uint(VALUE);
10260
10261__attribute__((__artificial__))
10262static inline int
10263RB_FIX2INT(VALUE x)
10264{
10265
10266
10267
10268
10269
10270
10271 long ret;
10272
10273 if (sizeof(int) < sizeof(long)) {
10274 ret = rb_fix2int(x);
10275 }
10276 else {
10277 ret = rb_fix2long(x);
10278 }
10279
10280 return ((int)ret);
10281}
10282
10283static inline int
10284rb_num2int_inline(VALUE x)
10285{
10286 long ret;
10287
10288 if (sizeof(int) == sizeof(long)) {
10289 ret = rb_num2long_inline(x);
10290 }
10291 else if (RB_FIXNUM_P(x)) {
10292 ret = rb_fix2int(x);
10293 }
10294 else {
10295 ret = rb_num2int(x);
10296 }
10297
10298 return ((int)ret);
10299}
10300
10301__attribute__((__artificial__))
10302static inline unsigned int
10303RB_NUM2UINT(VALUE x)
10304{
10305 unsigned long ret;
10306
10307 if (sizeof(int) < sizeof(long)) {
10308 ret = rb_num2uint(x);
10309 }
10310 else {
10311 ret = rb_num2ulong_inline(x);
10312 }
10313
10314 return ((unsigned int)ret);
10315}
10316
10317__attribute__((__artificial__))
10318static inline unsigned int
10319RB_FIX2UINT(VALUE x)
10320{
10321
10322
10323
10324 unsigned long ret;
10325
10326 if (sizeof(int) < sizeof(long)) {
10327 ret = rb_fix2uint(x);
10328 }
10329 else {
10330 ret = rb_fix2ulong(x);
10331 }
10332
10333 return ((unsigned int)ret);
10334}
10335
10336
10337
10338
10339
10340
10341static inline VALUE
10342rb_int2num_inline(int v)
10343{
10344 if ((((v) < (9223372036854775807L / 2) + 1) && ((v) >= ((-9223372036854775807L -1L) / 2))))
10345 return RB_INT2FIX(v);
10346 else
10347 return rb_int2big(v);
10348}
10349
10350static inline VALUE
10351rb_uint2num_inline(unsigned int v)
10352{
10353 if (((v) < (9223372036854775807L / 2) + 1))
10354 return RB_INT2FIX(v);
10355 else
10356 return rb_uint2big(v);
10357}
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379enum ruby_rvalue_flags { RVALUE_EMBED_LEN_MAX = 3 };
10380
10381struct
10382__declspec(align(8))
10383RBasic {
10384 VALUE flags;
10385 const VALUE klass;
10386};
10387
10388VALUE rb_obj_hide(VALUE obj);
10389VALUE rb_obj_reveal(VALUE obj, VALUE klass);
10390
10391__attribute__((__pure__))
10392__attribute__((__artificial__))
10393static inline VALUE
10394RBASIC_CLASS(VALUE obj)
10395{
10396 ((void)0);
10397 return ((struct RBasic *)(obj))->klass;
10398}
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416enum
10417__attribute__((__enum_extensibility__(closed)))
10418ruby_value_type {
10419 RUBY_T_NONE = 0x00,
10420
10421 RUBY_T_OBJECT = 0x01,
10422 RUBY_T_CLASS = 0x02,
10423 RUBY_T_MODULE = 0x03,
10424 RUBY_T_FLOAT = 0x04,
10425 RUBY_T_STRING = 0x05,
10426 RUBY_T_REGEXP = 0x06,
10427 RUBY_T_ARRAY = 0x07,
10428 RUBY_T_HASH = 0x08,
10429 RUBY_T_STRUCT = 0x09,
10430 RUBY_T_BIGNUM = 0x0a,
10431 RUBY_T_FILE = 0x0b,
10432 RUBY_T_DATA = 0x0c,
10433 RUBY_T_MATCH = 0x0d,
10434 RUBY_T_COMPLEX = 0x0e,
10435 RUBY_T_RATIONAL = 0x0f,
10436
10437 RUBY_T_NIL = 0x11,
10438 RUBY_T_TRUE = 0x12,
10439 RUBY_T_FALSE = 0x13,
10440 RUBY_T_SYMBOL = 0x14,
10441 RUBY_T_FIXNUM = 0x15,
10442 RUBY_T_UNDEF = 0x16,
10443
10444 RUBY_T_IMEMO = 0x1a,
10445 RUBY_T_NODE = 0x1b,
10446 RUBY_T_ICLASS = 0x1c,
10447 RUBY_T_ZOMBIE = 0x1d,
10448 RUBY_T_MOVED = 0x1e,
10449
10450 RUBY_T_MASK = 0x1f
10451};
10452
10453__attribute__((__cold__))
10454void rb_check_type(VALUE obj, int t);
10455
10456__attribute__((__pure__))
10457__attribute__((__artificial__))
10458static inline enum ruby_value_type
10459RB_BUILTIN_TYPE(VALUE obj)
10460{
10461 ((void)0);
10462
10463 VALUE ret = ((struct RBasic *)(obj))->flags & RUBY_T_MASK;
10464 return ((enum ruby_value_type)ret);
10465}
10466
10467__attribute__((__pure__))
10468static inline _Bool
10469rb_integer_type_p(VALUE obj)
10470{
10471 if (RB_FIXNUM_P(obj)) {
10472 return 1;
10473 }
10474 else if (RB_SPECIAL_CONST_P(obj)) {
10475 return 0;
10476 }
10477 else {
10478 return RB_BUILTIN_TYPE(obj) == RUBY_T_BIGNUM;
10479 }
10480}
10481
10482__attribute__((__pure__))
10483static inline enum ruby_value_type
10484rb_type(VALUE obj)
10485{
10486 if (! RB_SPECIAL_CONST_P(obj)) {
10487 return RB_BUILTIN_TYPE(obj);
10488 }
10489 else if (obj == ((VALUE)RUBY_Qfalse)) {
10490 return RUBY_T_FALSE;
10491 }
10492 else if (obj == ((VALUE)RUBY_Qnil)) {
10493 return RUBY_T_NIL;
10494 }
10495 else if (obj == ((VALUE)RUBY_Qtrue)) {
10496 return RUBY_T_TRUE;
10497 }
10498 else if (obj == ((VALUE)RUBY_Qundef)) {
10499 return RUBY_T_UNDEF;
10500 }
10501 else if (RB_FIXNUM_P(obj)) {
10502 return RUBY_T_FIXNUM;
10503 }
10504 else if (RB_STATIC_SYM_P(obj)) {
10505 return RUBY_T_SYMBOL;
10506 }
10507 else {
10508 __builtin_assume(RB_FLONUM_P(obj));
10509 return RUBY_T_FLOAT;
10510 }
10511}
10512
10513__attribute__((__pure__))
10514__attribute__((__artificial__))
10515static inline _Bool
10516RB_FLOAT_TYPE_P(VALUE obj)
10517{
10518 if (RB_FLONUM_P(obj)) {
10519 return 1;
10520 }
10521 else if (RB_SPECIAL_CONST_P(obj)) {
10522 return 0;
10523 }
10524 else {
10525 return RB_BUILTIN_TYPE(obj) == RUBY_T_FLOAT;
10526 }
10527}
10528
10529__attribute__((__pure__))
10530__attribute__((__artificial__))
10531static inline _Bool
10532RB_DYNAMIC_SYM_P(VALUE obj)
10533{
10534 if (RB_SPECIAL_CONST_P(obj)) {
10535 return 0;
10536 }
10537 else {
10538 return RB_BUILTIN_TYPE(obj) == RUBY_T_SYMBOL;
10539 }
10540}
10541
10542__attribute__((__pure__))
10543__attribute__((__artificial__))
10544static inline _Bool
10545RB_SYMBOL_P(VALUE obj)
10546{
10547 return RB_STATIC_SYM_P(obj) || RB_DYNAMIC_SYM_P(obj);
10548}
10549
10550__attribute__((__pure__))
10551__attribute__((__artificial__))
10552__attribute__((__always_inline__)) inline
10553static _Bool
10554rbimpl_RB_TYPE_P_fastpath(VALUE obj, enum ruby_value_type t)
10555{
10556 if (t == RUBY_T_TRUE) {
10557 return obj == ((VALUE)RUBY_Qtrue);
10558 }
10559 else if (t == RUBY_T_FALSE) {
10560 return obj == ((VALUE)RUBY_Qfalse);
10561 }
10562 else if (t == RUBY_T_NIL) {
10563 return obj == ((VALUE)RUBY_Qnil);
10564 }
10565 else if (t == RUBY_T_UNDEF) {
10566 return obj == ((VALUE)RUBY_Qundef);
10567 }
10568 else if (t == RUBY_T_FIXNUM) {
10569 return RB_FIXNUM_P(obj);
10570 }
10571 else if (t == RUBY_T_SYMBOL) {
10572 return RB_SYMBOL_P(obj);
10573 }
10574 else if (t == RUBY_T_FLOAT) {
10575 return RB_FLOAT_TYPE_P(obj);
10576 }
10577 else if (RB_SPECIAL_CONST_P(obj)) {
10578 return 0;
10579 }
10580 else if (t == RB_BUILTIN_TYPE(obj)) {
10581 return 1;
10582 }
10583 else {
10584 return 0;
10585 }
10586}
10587
10588__attribute__((__pure__))
10589__attribute__((__artificial__))
10590static inline _Bool
10591RB_TYPE_P(VALUE obj, enum ruby_value_type t)
10592{
10593 if (__builtin_constant_p(t)) {
10594 return rbimpl_RB_TYPE_P_fastpath(obj, t);
10595 }
10596 else {
10597 return t == rb_type(obj);
10598 }
10599}
10600
10601
10602
10603
10604
10605__attribute__((__pure__))
10606__attribute__((__artificial__))
10607
10608static inline _Bool rbimpl_rtypeddata_p(VALUE obj);
10609
10610__attribute__((__artificial__))
10611static inline void
10612Check_Type(VALUE v, enum ruby_value_type t)
10613{
10614 if ((__builtin_expect(!!(! (__builtin_constant_p(t) ? rbimpl_RB_TYPE_P_fastpath((v), (t)) : (RB_TYPE_P)((v), (t)))), 0))) {
10615 goto slowpath;
10616 }
10617 else if (t != RUBY_T_DATA) {
10618 goto fastpath;
10619 }
10620 else if (rbimpl_rtypeddata_p(v)) {
10621
10622
10623
10624 goto slowpath;
10625 }
10626 else {
10627 goto fastpath;
10628 }
10629
10630 fastpath:
10631 return;
10632
10633 slowpath:
10634 rb_check_type(v, t);
10635}
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663enum ruby_fl_ushift { RUBY_FL_USHIFT = 12 };
10664__extension__
10665enum
10666__attribute__((__flag_enum__))
10667ruby_fl_type {
10668 RUBY_FL_WB_PROTECTED = (1<<5),
10669 RUBY_FL_PROMOTED0 = (1<<5),
10670 RUBY_FL_PROMOTED1 = (1<<6),
10672 RUBY_FL_FINALIZE = (1<<7),
10673 RUBY_FL_TAINT = (1<<8),
10675 RUBY_FL_SEEN_OBJ_ID = (1<<9),
10676 RUBY_FL_EXIVAR = (1<<10),
10677 RUBY_FL_FREEZE = (1<<11),
10678
10679 RUBY_FL_USER0 = (1<<(RUBY_FL_USHIFT+0)),
10680 RUBY_FL_USER1 = (1<<(RUBY_FL_USHIFT+1)),
10681 RUBY_FL_USER2 = (1<<(RUBY_FL_USHIFT+2)),
10682 RUBY_FL_USER3 = (1<<(RUBY_FL_USHIFT+3)),
10683 RUBY_FL_USER4 = (1<<(RUBY_FL_USHIFT+4)),
10684 RUBY_FL_USER5 = (1<<(RUBY_FL_USHIFT+5)),
10685 RUBY_FL_USER6 = (1<<(RUBY_FL_USHIFT+6)),
10686 RUBY_FL_USER7 = (1<<(RUBY_FL_USHIFT+7)),
10687 RUBY_FL_USER8 = (1<<(RUBY_FL_USHIFT+8)),
10688 RUBY_FL_USER9 = (1<<(RUBY_FL_USHIFT+9)),
10689 RUBY_FL_USER10 = (1<<(RUBY_FL_USHIFT+10)),
10690 RUBY_FL_USER11 = (1<<(RUBY_FL_USHIFT+11)),
10691 RUBY_FL_USER12 = (1<<(RUBY_FL_USHIFT+12)),
10692 RUBY_FL_USER13 = (1<<(RUBY_FL_USHIFT+13)),
10693 RUBY_FL_USER14 = (1<<(RUBY_FL_USHIFT+14)),
10694 RUBY_FL_USER15 = (1<<(RUBY_FL_USHIFT+15)),
10695 RUBY_FL_USER16 = (1<<(RUBY_FL_USHIFT+16)),
10696 RUBY_FL_USER17 = (1<<(RUBY_FL_USHIFT+17)),
10697 RUBY_FL_USER18 = (1<<(RUBY_FL_USHIFT+18)),
10698
10699 RUBY_FL_USER19 = (1<<(RUBY_FL_USHIFT+19)),
10700
10701
10702
10703
10706};
10707
10709
10710void rb_obj_infect(VALUE victim, VALUE carrier);
10711void rb_freeze_singleton_class(VALUE klass);
10712
10713__attribute__((__pure__))
10714__attribute__((__artificial__))
10715__attribute__((__always_inline__)) inline
10716static _Bool
10717RB_FL_ABLE(VALUE obj)
10718{
10719 if (RB_SPECIAL_CONST_P(obj)) {
10720 return 0;
10721 }
10722 else if ((__builtin_constant_p(RUBY_T_NODE) ? rbimpl_RB_TYPE_P_fastpath((obj), (RUBY_T_NODE)) : (RB_TYPE_P)((obj), (RUBY_T_NODE)))) {
10723 return 0;
10724 }
10725 else {
10726 return 1;
10727 }
10728}
10729
10730__attribute__((__pure__))
10731__attribute__((__artificial__))
10732static inline VALUE
10733RB_FL_TEST_RAW(VALUE obj, VALUE flags)
10734{
10735 ((void)0);
10736 return ((struct RBasic *)(obj))->flags & flags;
10737}
10738
10739__attribute__((__pure__))
10740__attribute__((__artificial__))
10741static inline VALUE
10742RB_FL_TEST(VALUE obj, VALUE flags)
10743{
10744 if (RB_FL_ABLE(obj)) {
10745 return RB_FL_TEST_RAW(obj, flags);
10746 }
10747 else {
10748 return 0UL;
10749 }
10750}
10751
10752__attribute__((__pure__))
10753__attribute__((__artificial__))
10754static inline _Bool
10755RB_FL_ANY_RAW(VALUE obj, VALUE flags)
10756{
10757 return RB_FL_TEST_RAW(obj, flags);
10758}
10759
10760__attribute__((__pure__))
10761__attribute__((__artificial__))
10762static inline _Bool
10763RB_FL_ANY(VALUE obj, VALUE flags)
10764{
10765 return RB_FL_TEST(obj, flags);
10766}
10767
10768__attribute__((__pure__))
10769__attribute__((__artificial__))
10770static inline _Bool
10771RB_FL_ALL_RAW(VALUE obj, VALUE flags)
10772{
10773 return RB_FL_TEST_RAW(obj, flags) == flags;
10774}
10775
10776__attribute__((__pure__))
10777__attribute__((__artificial__))
10778static inline _Bool
10779RB_FL_ALL(VALUE obj, VALUE flags)
10780{
10781 return RB_FL_TEST(obj, flags) == flags;
10782}
10783
10784__declspec(noalias)
10785__attribute__((__artificial__))
10786static inline void
10787rbimpl_fl_set_raw_raw(struct RBasic *obj, VALUE flags)
10788{
10789 obj->flags |= flags;
10790}
10791
10792__attribute__((__artificial__))
10793static inline void
10794RB_FL_SET_RAW(VALUE obj, VALUE flags)
10795{
10796 ((void)0);
10797 rbimpl_fl_set_raw_raw(((struct RBasic *)(obj)), flags);
10798}
10799
10800__attribute__((__artificial__))
10801static inline void
10802RB_FL_SET(VALUE obj, VALUE flags)
10803{
10804 if (RB_FL_ABLE(obj)) {
10805 RB_FL_SET_RAW(obj, flags);
10806 }
10807}
10808
10809__declspec(noalias)
10810__attribute__((__artificial__))
10811static inline void
10812rbimpl_fl_unset_raw_raw(struct RBasic *obj, VALUE flags)
10813{
10814 obj->flags &= ~flags;
10815}
10816
10817__attribute__((__artificial__))
10818static inline void
10819RB_FL_UNSET_RAW(VALUE obj, VALUE flags)
10820{
10821 ((void)0);
10822 rbimpl_fl_unset_raw_raw(((struct RBasic *)(obj)), flags);
10823}
10824
10825__attribute__((__artificial__))
10826static inline void
10827RB_FL_UNSET(VALUE obj, VALUE flags)
10828{
10829 if (RB_FL_ABLE(obj)) {
10830 RB_FL_UNSET_RAW(obj, flags);
10831 }
10832}
10833
10834__declspec(noalias)
10835__attribute__((__artificial__))
10836static inline void
10837rbimpl_fl_reverse_raw_raw(struct RBasic *obj, VALUE flags)
10838{
10839 obj->flags ^= flags;
10840}
10841
10842__attribute__((__artificial__))
10843static inline void
10844RB_FL_REVERSE_RAW(VALUE obj, VALUE flags)
10845{
10846 ((void)0);
10847 rbimpl_fl_reverse_raw_raw(((struct RBasic *)(obj)), flags);
10848}
10849
10850__attribute__((__artificial__))
10851static inline void
10852RB_FL_REVERSE(VALUE obj, VALUE flags)
10853{
10854 if (RB_FL_ABLE(obj)) {
10856 }
10857}
10858
10859__attribute__((__pure__))
10860__attribute__((__artificial__))
10861static inline _Bool
10862RB_OBJ_TAINTABLE(VALUE obj)
10863{
10864 if (! RB_FL_ABLE(obj)) {
10865 return 0;
10866 }
10867 else if ((__builtin_constant_p(RUBY_T_BIGNUM) ? rbimpl_RB_TYPE_P_fastpath((obj), (RUBY_T_BIGNUM)) : (RB_TYPE_P)((obj), (RUBY_T_BIGNUM)))) {
10868 return 0;
10869 }
10870 else if ((__builtin_constant_p(RUBY_T_FLOAT) ? rbimpl_RB_TYPE_P_fastpath((obj), (RUBY_T_FLOAT)) : (RB_TYPE_P)((obj), (RUBY_T_FLOAT)))) {
10871 return 0;
10872 }
10873 else {
10874 return 1;
10875 }
10876}
10877
10878__attribute__((__pure__))
10879__attribute__((__artificial__))
10880static inline VALUE
10881RB_OBJ_TAINTED_RAW(VALUE obj)
10882{
10883 return RB_FL_TEST_RAW(obj, RUBY_FL_TAINT);
10884}
10885
10886__attribute__((__pure__))
10887__attribute__((__artificial__))
10888static inline _Bool
10889RB_OBJ_TAINTED(VALUE obj)
10890{
10891 return RB_FL_ANY(obj, RUBY_FL_TAINT);
10892}
10893
10894__attribute__((__artificial__))
10895static inline void
10896RB_OBJ_TAINT_RAW(VALUE obj)
10897{
10899}
10900
10901__attribute__((__artificial__))
10902static inline void
10903RB_OBJ_TAINT(VALUE obj)
10904{
10905 if (RB_OBJ_TAINTABLE(obj)) {
10906 RB_OBJ_TAINT_RAW(obj);
10907 }
10908}
10909
10910__attribute__((__artificial__))
10911static inline void
10912RB_OBJ_INFECT_RAW(VALUE dst, VALUE src)
10913{
10914 ((void)0);
10915 ((void)0);
10917}
10918
10919__attribute__((__artificial__))
10920static inline void
10921RB_OBJ_INFECT(VALUE dst, VALUE src)
10922{
10923 if (RB_OBJ_TAINTABLE(dst) && RB_FL_ABLE(src)) {
10924 RB_OBJ_INFECT_RAW(dst, src);
10925 }
10926}
10927
10928__attribute__((__pure__))
10929__attribute__((__artificial__))
10930
10931
10932
10933static inline VALUE
10934RB_OBJ_FROZEN_RAW(VALUE obj)
10935{
10936 return RB_FL_TEST_RAW(obj, RUBY_FL_FREEZE);
10937}
10938
10939__attribute__((__pure__))
10940__attribute__((__artificial__))
10941static inline _Bool
10942RB_OBJ_FROZEN(VALUE obj)
10943{
10944 if (! RB_FL_ABLE(obj)) {
10945 return 1;
10946 }
10947 else {
10948 return RB_OBJ_FROZEN_RAW(obj);
10949 }
10950}
10951
10952__attribute__((__artificial__))
10953static inline void
10954RB_OBJ_FREEZE_RAW(VALUE obj)
10955{
10957}
10958
10959static inline void
10960rb_obj_freeze_inline(VALUE x)
10961{
10962 if (RB_FL_ABLE(x)) {
10964 if (RBASIC_CLASS(x) && !(((struct RBasic *)(x))->flags & RUBY_FL_SINGLETON)) {
10965 rb_freeze_singleton_class(x);
10966 }
10967 }
10968}
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981enum ruby_rstring_flags {
10982 RSTRING_NOEMBED = RUBY_FL_USER1,
10983 RSTRING_EMBED_LEN_MASK = RUBY_FL_USER2 | RUBY_FL_USER3 | RUBY_FL_USER4 |
10985
10986
10987 RSTRING_FSTR = RUBY_FL_USER17
10988};
10989
10990enum ruby_rstring_consts {
10991 RSTRING_EMBED_LEN_SHIFT = RUBY_FL_USHIFT + 2,
10992 RSTRING_EMBED_LEN_MAX = ((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(char))) - 1
10993};
10994
10995struct RString {
10997 union {
10998 struct {
10999 long len;
11000 char *ptr;
11001 union {
11002 long capa;
11003 VALUE shared;
11004 } aux;
11005 } heap;
11006 char ary[RSTRING_EMBED_LEN_MAX + 1];
11007 } as;
11008};
11009
11010VALUE rb_str_to_str(VALUE);
11011VALUE rb_string_value(volatile VALUE*);
11012char *rb_string_value_ptr(volatile VALUE*);
11013char *rb_string_value_cstr(volatile VALUE*);
11014VALUE rb_str_export(VALUE);
11015VALUE rb_str_export_locale(VALUE);
11016
11017
11018void rb_check_safe_str(VALUE);
11019
11020__attribute__((__pure__))
11021__attribute__((__artificial__))
11022static inline long
11023RSTRING_EMBED_LEN(VALUE str)
11024{
11025 ((void)0);
11026 ((void)0);
11027
11028 VALUE f = ((struct RBasic *)(str))->flags;
11029 f &= RSTRING_EMBED_LEN_MASK;
11030 f >>= RSTRING_EMBED_LEN_SHIFT;
11031 return ((long)f);
11032}
11033
11034
11035
11036
11037
11038__attribute__((__pure__))
11039__attribute__((__artificial__))
11040static inline struct RString
11041rbimpl_rstring_getmem(VALUE str)
11042{
11043 ((void)0);
11044
11045 if (RB_FL_ANY_RAW(str, RSTRING_NOEMBED)) {
11046 return *((struct RString *)(str));
11047 }
11048 else {
11049
11050 struct RString retval;
11051 retval.as.heap.len = RSTRING_EMBED_LEN(str);
11052 retval.as.heap.ptr = ((struct RString *)(str))->as.ary;
11053 return retval;
11054 }
11055}
11056
11057
11058__attribute__((__pure__))
11059__attribute__((__artificial__))
11060static inline long
11061RSTRING_LEN(VALUE str)
11062{
11063 return rbimpl_rstring_getmem(str).as.heap.len;
11064}
11065
11066__attribute__((__artificial__))
11067static inline char *
11068RSTRING_PTR(VALUE str)
11069{
11070 char *ptr = rbimpl_rstring_getmem(str).as.heap.ptr;
11071
11072 if ((__builtin_expect(!!(! ptr), 0))) {
11073 __fprintf_chk (stderr, 2 - 1, "%s\n", "RSTRING_PTR is returning NULL!! " "SIGSEGV is highly expected to follow immediately. " "If you could reproduce, attach your debugger here, " "and look at the passed string.");
11074
11075
11076
11077
11078
11079 }
11080
11081 return ptr;
11082}
11083
11084__attribute__((__artificial__))
11085static inline char *
11086RSTRING_END(VALUE str)
11087{
11088 struct RString buf = rbimpl_rstring_getmem(str);
11089
11090 if ((__builtin_expect(!!(! buf.as.heap.ptr), 0))) {
11091
11092 __fprintf_chk (stderr, 2 - 1, "%s\n", "RSTRING_END is returning NULL!! " "SIGSEGV is highly expected to follow immediately. " "If you could reproduce, attach your debugger here, " "and look at the passed string.");
11093
11094
11095
11096
11097
11098 }
11099
11100 return &buf.as.heap.ptr[buf.as.heap.len];
11101}
11102
11103__attribute__((__artificial__))
11104static inline int
11105RSTRING_LENINT(VALUE str)
11106{
11107 return rb_long2int_inline(RSTRING_LEN(str));
11108}
11109
11110
11111
11112
11113
11114
11115
11116
11117__attribute__((__const__))
11118
11119__attribute__((__artificial__))
11120static inline VALUE
11121RB_CHR2FIX(unsigned char c)
11122{
11123 return RB_INT2FIX(c);
11124}
11125
11126static inline char
11127rb_num2char_inline(VALUE x)
11128{
11129 if ((__builtin_constant_p(RUBY_T_STRING) ? rbimpl_RB_TYPE_P_fastpath((x), (RUBY_T_STRING)) : (RB_TYPE_P)((x), (RUBY_T_STRING))) && (RSTRING_LEN(x)>=1))
11130 return RSTRING_PTR(x)[0];
11131 else
11132 return ((char)rb_num2int_inline(x));
11133}
11134
11135
11136double rb_num2dbl(VALUE);
11137__attribute__((__pure__))
11138double rb_float_value(VALUE);
11139VALUE rb_float_new(double);
11140VALUE rb_float_new_in_heap(double);
11141
11142
11143
11144
11145
11146
11147
11148VALUE rb_ll2inum(
11149 long long
11150);
11151VALUE rb_ull2inum(unsigned
11152 long long
11153);
11154 long long
11155 rb_num2ll(VALUE);
11156unsigned
11157 long long
11158 rb_num2ull(VALUE);
11159
11160static inline
11161 long long
11162rb_num2ll_inline(VALUE x)
11163{
11164 if (RB_FIXNUM_P(x))
11165 return rb_fix2long(x);
11166 else
11167 return rb_num2ll(x);
11168}
11169
11170
11171
11172
11173
11174short rb_num2short(VALUE);
11175unsigned short rb_num2ushort(VALUE);
11176short rb_fix2short(VALUE);
11177unsigned short rb_fix2ushort(VALUE);
11178
11179static inline short
11180rb_num2short_inline(VALUE x)
11181{
11182 if (RB_FIXNUM_P(x))
11183 return rb_fix2short(x);
11184 else
11185 return rb_num2short(x);
11186}
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198typedef unsigned long st_data_t;
11199
11200
11201
11202
11203
11204typedef struct st_table st_table;
11205
11206typedef st_data_t st_index_t;
11207
11208
11209
11210typedef int st_compare_func(st_data_t, st_data_t);
11211typedef st_index_t st_hash_func(st_data_t);
11212
11213typedef char st_check_for_sizeof_st_index_t[8 == (int)sizeof(st_index_t) ? 1 : -1];
11214
11215struct st_hash_type {
11216 int (*compare)(st_data_t, st_data_t);
11217 st_index_t (*hash)(st_data_t);
11218};
11219
11220
11221
11222
11223
11224
11225
11226
11227typedef struct st_table_entry st_table_entry;
11228
11229struct st_table_entry;
11230
11231struct st_table {
11232
11233 unsigned char entry_power, bin_power, size_ind;
11234
11235 unsigned int rebuilds_num;
11236 const struct st_hash_type *type;
11237
11238 st_index_t num_entries;
11239
11240 st_index_t *bins;
11241
11242
11243
11244 st_index_t entries_start, entries_bound;
11245
11246 st_table_entry *entries;
11247};
11248
11249
11250enum st_retval {ST_CONTINUE, ST_STOP, ST_DELETE, ST_CHECK, ST_REPLACE};
11251
11252st_table *rb_st_init_table(const struct st_hash_type *);
11253st_table *rb_st_init_table_with_size(const struct st_hash_type *, st_index_t);
11254st_table *rb_st_init_numtable(void);
11255st_table *rb_st_init_numtable_with_size(st_index_t);
11256st_table *rb_st_init_strtable(void);
11257st_table *rb_st_init_strtable_with_size(st_index_t);
11258st_table *rb_st_init_strcasetable(void);
11259st_table *rb_st_init_strcasetable_with_size(st_index_t);
11260int rb_st_delete(st_table *, st_data_t *, st_data_t *);
11261int rb_st_delete_safe(st_table *, st_data_t *, st_data_t *, st_data_t);
11262int rb_st_shift(st_table *, st_data_t *, st_data_t *);
11263int rb_st_insert(st_table *, st_data_t, st_data_t);
11264int rb_st_insert2(st_table *, st_data_t, st_data_t, st_data_t (*)(st_data_t));
11265int rb_st_lookup(st_table *, st_data_t, st_data_t *);
11266int rb_st_get_key(st_table *, st_data_t, st_data_t *);
11267typedef int st_update_callback_func(st_data_t *key, st_data_t *value, st_data_t arg, int existing);
11268
11269
11270
11271int rb_st_update(st_table *table, st_data_t key, st_update_callback_func *func, st_data_t arg);
11272typedef int st_foreach_callback_func(st_data_t, st_data_t, st_data_t);
11273typedef int st_foreach_check_callback_func(st_data_t, st_data_t, st_data_t, int);
11274int rb_st_foreach_with_replace(st_table *tab, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg);
11275int rb_st_foreach(st_table *, st_foreach_callback_func *, st_data_t);
11276int rb_st_foreach_check(st_table *, st_foreach_check_callback_func *, st_data_t, st_data_t);
11277st_index_t rb_st_keys(st_table *table, st_data_t *keys, st_index_t size);
11278st_index_t rb_st_keys_check(st_table *table, st_data_t *keys, st_index_t size, st_data_t never);
11279st_index_t rb_st_values(st_table *table, st_data_t *values, st_index_t size);
11280st_index_t rb_st_values_check(st_table *table, st_data_t *values, st_index_t size, st_data_t never);
11281void rb_st_add_direct(st_table *, st_data_t, st_data_t);
11282void rb_st_free_table(st_table *);
11283void rb_st_cleanup_safe(st_table *, st_data_t);
11284void rb_st_clear(st_table *);
11285st_table *rb_st_copy(st_table *);
11286__attribute__((__const__)) int rb_st_numcmp(st_data_t, st_data_t);
11287__attribute__((__const__)) st_index_t rb_st_numhash(st_data_t);
11288__attribute__((__pure__)) int rb_st_locale_insensitive_strcasecmp(const char *s1, const char *s2);
11289__attribute__((__pure__)) int rb_st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n);
11290__attribute__((__pure__)) size_t rb_st_memsize(const st_table *);
11291__attribute__((__pure__)) st_index_t rb_st_hash(const void *ptr, size_t len, st_index_t h);
11292__attribute__((__const__)) st_index_t rb_st_hash_uint32(st_index_t h, uint32_t i);
11293__attribute__((__const__)) st_index_t rb_st_hash_uint(st_index_t h, st_index_t i);
11294__attribute__((__const__)) st_index_t rb_st_hash_end(st_index_t h);
11295__attribute__((__const__)) st_index_t rb_st_hash_start(st_index_t h);
11296
11297void rb_hash_bulk_insert_into_st_table(long, const VALUE *, VALUE);
11298
11299
11300
11301
11302
11303__attribute__((__const__))
11304
11305__attribute__((__artificial__))
11306
11307static inline VALUE
11308RB_ST2FIX(st_data_t i)
11309{
11310 long x = i;
11311
11312 if (x >= 0) {
11313 x &= (9223372036854775807L / 2);
11314 }
11315 else {
11316 x |= ((-9223372036854775807L -1L) / 2);
11317 }
11318
11319 ((void)0);
11320 unsigned long y = ((unsigned long)x);
11321 return RB_INT2FIX(y);
11322}
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383void rb_gc_writebarrier(VALUE a, VALUE b);
11384void rb_gc_writebarrier_unprotect(VALUE obj);
11385
11386
11387
11388
11389__attribute__((__pure__))
11390__attribute__((__artificial__))
11391static inline _Bool
11392RB_OBJ_PROMOTED_RAW(VALUE obj)
11393{
11394 ((void)0);
11395 return RB_FL_ANY_RAW(obj, RUBY_FL_PROMOTED);
11396}
11397
11398__attribute__((__pure__))
11399__attribute__((__artificial__))
11400static inline _Bool
11401RB_OBJ_PROMOTED(VALUE obj)
11402{
11403 if (! RB_FL_ABLE(obj)) {
11404 return 0;
11405 }
11406 else {
11407 return RB_OBJ_PROMOTED_RAW(obj);
11408 }
11409}
11410
11411static inline VALUE
11412rb_obj_wb_unprotect(VALUE x, const char *filename __attribute__((__unused__)), int line __attribute__((__unused__)))
11413{
11414
11415
11416
11418 return x;
11419}
11420
11421static inline VALUE
11422rb_obj_written(VALUE a, VALUE oldv __attribute__((__unused__)), VALUE b, const char *filename __attribute__((__unused__)), int line __attribute__((__unused__)))
11423{
11424
11425
11426
11427
11428 if (!RB_SPECIAL_CONST_P(b)) {
11429 rb_gc_writebarrier(a, b);
11430 }
11431
11432 return a;
11433}
11434
11435static inline VALUE
11436rb_obj_write(VALUE a, VALUE *slot, VALUE b, const char *filename __attribute__((__unused__)), int line __attribute__((__unused__)))
11437{
11438
11439
11440
11441
11442 *slot = b;
11443
11444 rb_obj_written(a, ((VALUE)RUBY_Qundef) , b, filename, line);
11445 return a;
11446}
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470enum ruby_rarray_flags {
11471 RARRAY_EMBED_FLAG = RUBY_FL_USER1,
11472
11473 RARRAY_EMBED_LEN_MASK = RUBY_FL_USER4 | RUBY_FL_USER3
11474
11475 ,
11476 RARRAY_TRANSIENT_FLAG = RUBY_FL_USER13
11477
11478};
11479
11480enum ruby_rarray_consts {
11482 RARRAY_EMBED_LEN_MAX = ((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(VALUE)))
11483};
11484
11485struct RArray {
11487 union {
11488 struct {
11489 long len;
11490 union {
11491 long capa;
11492
11493
11494
11495 const
11496
11498 } aux;
11499 const VALUE *ptr;
11500 } heap;
11501 const VALUE ary[RARRAY_EMBED_LEN_MAX];
11502 } as;
11503};
11504
11505VALUE *rb_ary_ptr_use_start(VALUE ary);
11506void rb_ary_ptr_use_end(VALUE a);
11507
11508void rb_ary_detransient(VALUE a);
11509
11510
11511__attribute__((__pure__))
11512__attribute__((__artificial__))
11513static inline long
11514RARRAY_EMBED_LEN(VALUE ary)
11515{
11516 ((void)0);
11517 ((void)0);
11518
11519 VALUE f = ((struct RBasic *)(ary))->flags;
11520 f &= RARRAY_EMBED_LEN_MASK;
11522 return ((long)f);
11523}
11524
11525__attribute__((__pure__))
11526static inline long
11527rb_array_len(VALUE a)
11528{
11529 ((void)0);
11530
11531 if (RB_FL_ANY_RAW(a, RARRAY_EMBED_FLAG)) {
11532 return RARRAY_EMBED_LEN(a);
11533 }
11534 else {
11535 return ((struct RArray *)(a))->as.heap.len;
11536 }
11537}
11538
11539__attribute__((__artificial__))
11540static inline int
11541RARRAY_LENINT(VALUE ary)
11542{
11543 return rb_long2int_inline(rb_array_len(ary));
11544}
11545
11546__attribute__((__pure__))
11547__attribute__((__artificial__))
11548static inline _Bool
11549RARRAY_TRANSIENT_P(VALUE ary)
11550{
11551 ((void)0);
11552
11553
11554 return RB_FL_ANY_RAW(ary, RARRAY_TRANSIENT_FLAG);
11555
11556
11557
11558}
11559
11560__attribute__((__pure__))
11561
11562static inline const VALUE *
11563rb_array_const_ptr_transient(VALUE a)
11564{
11565 ((void)0);
11566
11567 if (RB_FL_ANY_RAW(a, RARRAY_EMBED_FLAG)) {
11568 return (((struct RArray *)(a))->as.ary);
11569 }
11570 else {
11571 return (((struct RArray *)(a))->as.heap.ptr);
11572 }
11573}
11574
11575
11576
11577
11578
11579static inline const VALUE *
11580rb_array_const_ptr(VALUE a)
11581{
11582 ((void)0);
11583
11584
11585 if (RARRAY_TRANSIENT_P(a)) {
11587 }
11588
11589 return rb_array_const_ptr_transient(a);
11590}
11591
11592
11593static inline VALUE *
11594rb_array_ptr_use_start(VALUE a,
11595 __attribute__((__unused__))
11596 int allow_transient)
11597{
11598 ((void)0);
11599
11600
11601 if (!allow_transient) {
11602 if (RARRAY_TRANSIENT_P(a)) {
11604 }
11605 }
11606
11607
11608 return rb_ary_ptr_use_start(a);
11609}
11610
11611
11612static inline void
11613rb_array_ptr_use_end(VALUE a,
11614 __attribute__((__unused__))
11615 int allow_transient)
11616{
11617 ((void)0);
11618 rb_ary_ptr_use_end(a);
11619}
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632static inline VALUE *
11633RARRAY_PTR(VALUE ary)
11634{
11635 ((void)0);
11636
11637 VALUE tmp = (1 ? rb_obj_wb_unprotect(ary, "./include/ruby/internal/core/rarray.h", 248) : ary);
11638 return ((VALUE *)rb_array_const_ptr(tmp));
11639}
11640
11641static inline void
11642RARRAY_ASET(VALUE ary, long i, VALUE v)
11643{
11644 do { ((void)0); const VALUE rbimpl_ary = (ary); VALUE *ptr = rb_array_ptr_use_start(rbimpl_ary, (1)); (rb_obj_write((VALUE)(ary), (VALUE *)(&ptr[i]), (VALUE)(v), "./include/ruby/internal/core/rarray.h", 256)); rb_array_ptr_use_end(rbimpl_ary, (1)); } while (0);
11645
11646}
11647
11648
11649
11650
11651
11652
11653int rb_big_sign(VALUE num);
11654
11655static inline _Bool
11656RBIGNUM_POSITIVE_P(VALUE b) {
11657 ((void)0);
11658 return rb_big_sign(b);
11659}
11660
11661static inline _Bool
11662RBIGNUM_NEGATIVE_P(VALUE b) {
11663 ((void)0);
11664 return ! RBIGNUM_POSITIVE_P(b);
11665}
11666
11667
11668
11669enum ruby_rmodule_flags {
11670 RMODULE_IS_OVERLAID = RUBY_FL_USER2,
11671 RMODULE_IS_REFINEMENT = RUBY_FL_USER3,
11672 RMODULE_INCLUDED_INTO_REFINEMENT = RUBY_FL_USER4
11673};
11674
11675struct RClass;
11676
11677VALUE rb_class_get_superclass(VALUE);
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692typedef void (*RUBY_DATA_FUNC)(void*);
11693
11694struct RData {
11698 void *data;
11699};
11700
11701VALUE rb_data_object_wrap(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree);
11702VALUE rb_data_object_zalloc(VALUE klass, size_t size, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree);
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712 __attribute__((__deprecated__ ("by TypedData")))
11713static inline VALUE
11714rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free)
11715{
11716 return rb_data_object_wrap(klass, ptr, mark, free);
11717}
11718
11719static inline void *
11720rb_data_object_get(VALUE obj)
11721{
11722 Check_Type(obj, RUBY_T_DATA);
11723 return ((struct RData *)(obj))->data;
11724}
11725
11726 __attribute__((__deprecated__ ("by TypedData")))
11727static inline void *
11728rb_data_object_get_warning(VALUE obj)
11729{
11730 return rb_data_object_get(obj);
11731}
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741static inline VALUE
11742rb_data_object_make(VALUE klass, RUBY_DATA_FUNC mark_func, RUBY_DATA_FUNC free_func, void **datap, size_t size)
11743{
11744 VALUE result = rb_data_object_zalloc( (klass), (size), ((void (*)(void *))(mark_func)), ((void (*)(void *))(free_func))); (*datap) = ((void *)((struct RData *)(result))->data); ((void)(*datap));
11745 return result;
11746}
11747
11748__attribute__((__deprecated__ ("by: rb_data_object_wrap")))
11749static inline VALUE
11750rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
11751{
11752 return rb_data_object_wrap(klass, data, dmark, dfree);
11753}
11754
11755
11756struct rb_io_t;
11757
11758struct RFile {
11760 struct rb_io_t *fptr;
11761};
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773struct st_table;
11774
11775size_t rb_hash_size_num(VALUE hash);
11776struct st_table *rb_hash_tbl(VALUE, const char *file, int line);
11777VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone);
11778
11779
11780
11781
11782enum ruby_robject_flags { ROBJECT_EMBED = RUBY_FL_USER1 };
11783
11784enum ruby_robject_consts { ROBJECT_EMBED_LEN_MAX = ((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(VALUE))) };
11785
11786struct st_table;
11787
11788struct RObject {
11790 union {
11791 struct {
11792 uint32_t numiv;
11793 VALUE *ivptr;
11795 } heap;
11797 } as;
11798};
11799
11800struct st_table *rb_obj_iv_index_tbl(const struct RObject *obj);
11801
11802__attribute__((__pure__))
11803__attribute__((__artificial__))
11804static inline uint32_t
11805ROBJECT_NUMIV(VALUE obj)
11806{
11807 ((void)0);
11808
11809 if (RB_FL_ANY_RAW(obj, ROBJECT_EMBED)) {
11810 return ROBJECT_EMBED_LEN_MAX;
11811 }
11812 else {
11813 return ((struct RObject *)(obj))->as.heap.numiv;
11814 }
11815}
11816
11817__attribute__((__pure__))
11818__attribute__((__artificial__))
11819static inline VALUE *
11820ROBJECT_IVPTR(VALUE obj)
11821{
11822 ((void)0);
11823
11824 struct RObject *const ptr = ((struct RObject *)(obj));
11825
11826 if (RB_FL_ANY_RAW(obj, ROBJECT_EMBED)) {
11827 return ptr->as.ary;
11828 }
11829 else {
11830 return ptr->as.heap.ivptr;
11831 }
11832}
11833
11834__attribute__((__deprecated__ ("Whoever have used it before? Just tell us so. We can stop deleting it.")))
11835__attribute__((__pure__))
11836__attribute__((__artificial__))
11837static inline struct st_table *
11838ROBJECT_IV_INDEX_TBL(VALUE obj)
11839{
11840 ((void)0);
11841
11842 struct RObject *const ptr = ((struct RObject *)(obj));
11843
11844 return rb_obj_iv_index_tbl(ptr);
11845}
11846
11847
11848
11849
11850struct re_patter_buffer;
11851
11852struct RRegexp {
11855 const VALUE src;
11856 unsigned long usecnt;
11857};
11858
11859__attribute__((__pure__))
11860__attribute__((__artificial__))
11861static inline VALUE
11862RREGEXP_SRC(VALUE rexp)
11863{
11864 ((void)0);
11865 VALUE ret = ((struct RRegexp *)(rexp))->src;
11866 ((void)0);
11867 return ret;
11868}
11869
11870__attribute__((__pure__))
11871__attribute__((__artificial__))
11872static inline char *
11873RREGEXP_SRC_PTR(VALUE rexp)
11874{
11875 return RSTRING_PTR(RREGEXP_SRC(rexp));
11876}
11877
11878__attribute__((__pure__))
11879__attribute__((__artificial__))
11880static inline long
11881RREGEXP_SRC_LEN(VALUE rexp)
11882{
11883 return RSTRING_LEN(RREGEXP_SRC(rexp));
11884}
11885
11886__attribute__((__pure__))
11887__attribute__((__artificial__))
11888static inline char *
11889RREGEXP_SRC_END(VALUE rexp)
11890{
11891 return RSTRING_END(RREGEXP_SRC(rexp));
11892}
11893
11894
11895
11896
11897
11898VALUE rb_struct_size(VALUE s);
11899VALUE rb_struct_aref(VALUE, VALUE);
11900VALUE rb_struct_aset(VALUE, VALUE, VALUE);
11901
11902__attribute__((__artificial__))
11903static inline long
11904RSTRUCT_LEN(VALUE st)
11905{
11906 ((void)0);
11907
11909}
11910
11911__attribute__((__artificial__))
11912static inline VALUE
11913RSTRUCT_SET(VALUE st, int k, VALUE v)
11914{
11915 ((void)0);
11916
11917 return rb_struct_aset(st, rb_int2num_inline(k), (v));
11918}
11919
11920__attribute__((__artificial__))
11921static inline VALUE
11922RSTRUCT_GET(VALUE st, int k)
11923{
11924 ((void)0);
11925
11926 return rb_struct_aref(st, rb_int2num_inline(k));
11927}
11928
11929
11930
11931VALUE rb_errinfo(void);
11932void rb_set_errinfo(VALUE);
11933
11934
11935enum rb_io_wait_readwrite {RB_IO_WAIT_READABLE, RB_IO_WAIT_WRITABLE};
11936
11937__attribute__((__format__(__printf__, (2), (3)))) __declspec(noreturn) void rb_raise(VALUE, const char*, ...);
11938__attribute__((__format__(__printf__, (1), (2)))) __declspec(noreturn) void rb_fatal(const char*, ...);
11939__attribute__((__cold__)) __attribute__((__format__(__printf__, (1), (2)))) __declspec(noreturn) void rb_bug(const char*, ...);
11940__declspec(noreturn) void rb_bug_errno(const char*, int);
11941__declspec(noreturn) void rb_sys_fail(const char*);
11942__declspec(noreturn) void rb_sys_fail_str(VALUE);
11943__declspec(noreturn) void rb_mod_sys_fail(VALUE, const char*);
11944__declspec(noreturn) void rb_mod_sys_fail_str(VALUE, VALUE);
11945__declspec(noreturn) void rb_readwrite_sys_fail(enum rb_io_wait_readwrite, const char*);
11946__declspec(noreturn) void rb_iter_break(void);
11947__declspec(noreturn) void rb_iter_break_value(VALUE);
11948__declspec(noreturn) void rb_exit(int);
11949__declspec(noreturn) void rb_notimplement(void);
11950VALUE rb_syserr_new(int, const char *);
11951VALUE rb_syserr_new_str(int n, VALUE arg);
11952__declspec(noreturn) void rb_syserr_fail(int, const char*);
11953__declspec(noreturn) void rb_syserr_fail_str(int, VALUE);
11954__declspec(noreturn) void rb_mod_syserr_fail(VALUE, int, const char*);
11955__declspec(noreturn) void rb_mod_syserr_fail_str(VALUE, int, VALUE);
11956__declspec(noreturn) void rb_readwrite_syserr_fail(enum rb_io_wait_readwrite, int, const char*);
11957__declspec(noreturn) void rb_unexpected_type(VALUE,int);
11958
11959VALUE *rb_ruby_verbose_ptr(void);
11960VALUE *rb_ruby_debug_ptr(void);
11961
11962
11963__attribute__((__format__(__printf__, (1), (2)))) void rb_warning(const char*, ...);
11964__attribute__((__format__(__printf__, (3), (4)))) void rb_compile_warning(const char *, int, const char*, ...);
11965__attribute__((__format__(__printf__, (1), (2)))) void rb_sys_warning(const char*, ...);
11966
11967__attribute__((__cold__)) __attribute__((__format__(__printf__, (1), (2)))) void rb_warn(const char*, ...);
11968__attribute__((__format__(__printf__, (3), (4)))) void rb_compile_warn(const char *, int, const char*, ...);
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980enum rbimpl_typeddata_flags {
11981 RUBY_TYPED_FREE_IMMEDIATELY = 1,
11982 RUBY_TYPED_WB_PROTECTED = RUBY_FL_WB_PROTECTED,
11983 RUBY_TYPED_PROMOTED1 = RUBY_FL_PROMOTED1
11984};
11985
11986typedef struct rb_data_type_struct rb_data_type_t;
11987
11989 const char *wrap_struct_name;
11990 struct {
11993 size_t (*dsize)(const void *);
11995 void *reserved[1];
11996
11997 } function;
11999 void *data;
12000
12001 VALUE flags;
12002};
12003
12008 void *data;
12009};
12010
12011VALUE rb_data_typed_object_wrap(VALUE klass, void *datap, const rb_data_type_t *);
12012VALUE rb_data_typed_object_zalloc(VALUE klass, size_t size, const rb_data_type_t *type);
12013int rb_typeddata_inherited_p(const rb_data_type_t *child, const rb_data_type_t *parent);
12014int rb_typeddata_is_kind_of(VALUE obj, const rb_data_type_t *data_type);
12015void *rb_check_typeddata(VALUE obj, const rb_data_type_t *data_type);
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026__attribute__((__pure__))
12027__attribute__((__artificial__))
12028static inline _Bool
12029rbimpl_rtypeddata_p(VALUE obj)
12030{
12031 return ((struct RTypedData *)(obj))->typed_flag == 1;
12032}
12033
12034__attribute__((__pure__))
12035__attribute__((__artificial__))
12036static inline _Bool
12037RTYPEDDATA_P(VALUE obj)
12038{
12039
12040
12041
12042
12043
12044
12045
12046 return rbimpl_rtypeddata_p(obj);
12047}
12048
12049__attribute__((__pure__))
12050__attribute__((__artificial__))
12051
12052static inline const struct rb_data_type_struct *
12053RTYPEDDATA_TYPE(VALUE obj)
12054{
12055
12056
12057
12058
12059
12060
12061
12062 return ((struct RTypedData *)(obj))->type;
12063}
12064
12065static inline VALUE
12066rb_data_typed_object_make(VALUE klass, const rb_data_type_t *type, void **datap, size_t size)
12067{
12068 VALUE result = rb_data_typed_object_zalloc(klass, size, type); (*datap) = ((void *)(((struct RTypedData *)(result))->data)); ((void)(*datap));
12069 return result;
12070}
12071
12072__attribute__((__deprecated__ ("by: rb_data_typed_object_wrap")))
12073static inline VALUE
12074rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type)
12075{
12076 return rb_data_typed_object_wrap(klass, datap, type);
12077}
12078
12079
12080
12081enum
12082{
12083 _ISupper = ((0) < 8 ? ((1 << (0)) << 8) : ((1 << (0)) >> 8)),
12084 _ISlower = ((1) < 8 ? ((1 << (1)) << 8) : ((1 << (1)) >> 8)),
12085 _ISalpha = ((2) < 8 ? ((1 << (2)) << 8) : ((1 << (2)) >> 8)),
12086 _ISdigit = ((3) < 8 ? ((1 << (3)) << 8) : ((1 << (3)) >> 8)),
12087 _ISxdigit = ((4) < 8 ? ((1 << (4)) << 8) : ((1 << (4)) >> 8)),
12088 _ISspace = ((5) < 8 ? ((1 << (5)) << 8) : ((1 << (5)) >> 8)),
12089 _ISprint = ((6) < 8 ? ((1 << (6)) << 8) : ((1 << (6)) >> 8)),
12090 _ISgraph = ((7) < 8 ? ((1 << (7)) << 8) : ((1 << (7)) >> 8)),
12091 _ISblank = ((8) < 8 ? ((1 << (8)) << 8) : ((1 << (8)) >> 8)),
12092 _IScntrl = ((9) < 8 ? ((1 << (9)) << 8) : ((1 << (9)) >> 8)),
12093 _ISpunct = ((10) < 8 ? ((1 << (10)) << 8) : ((1 << (10)) >> 8)),
12094 _ISalnum = ((11) < 8 ? ((1 << (11)) << 8) : ((1 << (11)) >> 8))
12095};
12096extern const unsigned short int **__ctype_b_loc (void)
12097 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
12098extern const __int32_t **__ctype_tolower_loc (void)
12099 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
12100extern const __int32_t **__ctype_toupper_loc (void)
12101 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111extern int isalnum (int) __attribute__ ((__nothrow__ ));
12112extern int isalpha (int) __attribute__ ((__nothrow__ ));
12113extern int iscntrl (int) __attribute__ ((__nothrow__ ));
12114extern int isdigit (int) __attribute__ ((__nothrow__ ));
12115extern int islower (int) __attribute__ ((__nothrow__ ));
12116extern int isgraph (int) __attribute__ ((__nothrow__ ));
12117extern int isprint (int) __attribute__ ((__nothrow__ ));
12118extern int ispunct (int) __attribute__ ((__nothrow__ ));
12119extern int isspace (int) __attribute__ ((__nothrow__ ));
12120extern int isupper (int) __attribute__ ((__nothrow__ ));
12121extern int isxdigit (int) __attribute__ ((__nothrow__ ));
12122
12123
12124
12125extern int tolower (int __c) __attribute__ ((__nothrow__ ));
12126
12127
12128extern int toupper (int __c) __attribute__ ((__nothrow__ ));
12129
12130
12131
12132
12133extern int isblank (int) __attribute__ ((__nothrow__ ));
12134
12135
12136
12137
12138extern int isctype (int __c, int __mask) __attribute__ ((__nothrow__ ));
12139
12140
12141
12142
12143
12144
12145extern int isascii (int __c) __attribute__ ((__nothrow__ ));
12146
12147
12148
12149extern int toascii (int __c) __attribute__ ((__nothrow__ ));
12150
12151
12152
12153extern int _toupper (int) __attribute__ ((__nothrow__ ));
12154extern int _tolower (int) __attribute__ ((__nothrow__ ));
12155
12156
12157
12158
12159
12160
12161
12162
12163extern __inline __attribute__ ((__gnu_inline__)) int
12164__attribute__ ((__nothrow__ )) tolower (int __c)
12165{
12166 return __c >= -128 && __c < 256 ? (*__ctype_tolower_loc ())[__c] : __c;
12167}
12168
12169extern __inline __attribute__ ((__gnu_inline__)) int
12170__attribute__ ((__nothrow__ )) toupper (int __c)
12171{
12172 return __c >= -128 && __c < 256 ? (*__ctype_toupper_loc ())[__c] : __c;
12173}
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189extern int isalnum_l (int, locale_t) __attribute__ ((__nothrow__ ));
12190extern int isalpha_l (int, locale_t) __attribute__ ((__nothrow__ ));
12191extern int iscntrl_l (int, locale_t) __attribute__ ((__nothrow__ ));
12192extern int isdigit_l (int, locale_t) __attribute__ ((__nothrow__ ));
12193extern int islower_l (int, locale_t) __attribute__ ((__nothrow__ ));
12194extern int isgraph_l (int, locale_t) __attribute__ ((__nothrow__ ));
12195extern int isprint_l (int, locale_t) __attribute__ ((__nothrow__ ));
12196extern int ispunct_l (int, locale_t) __attribute__ ((__nothrow__ ));
12197extern int isspace_l (int, locale_t) __attribute__ ((__nothrow__ ));
12198extern int isupper_l (int, locale_t) __attribute__ ((__nothrow__ ));
12199extern int isxdigit_l (int, locale_t) __attribute__ ((__nothrow__ ));
12200
12201extern int isblank_l (int, locale_t) __attribute__ ((__nothrow__ ));
12202
12203
12204
12205extern int __tolower_l (int __c, locale_t __l) __attribute__ ((__nothrow__ ));
12206extern int tolower_l (int __c, locale_t __l) __attribute__ ((__nothrow__ ));
12207
12208
12209extern int __toupper_l (int __c, locale_t __l) __attribute__ ((__nothrow__ ));
12210extern int toupper_l (int __c, locale_t __l) __attribute__ ((__nothrow__ ));
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
12228
12229
12230
12231
12232
12233
12234
12235
12236
12237
12238
12239int rb_st_locale_insensitive_strcasecmp(const char *s1, const char *s2);
12240int rb_st_locale_insensitive_strncasecmp(const char *s1, const char *s2, size_t n);
12241unsigned long ruby_strtoul(const char *str, char **endptr, int base);
12242
12243
12244
12245
12246
12247
12248__attribute__((__const__))
12249
12250__attribute__((__artificial__))
12251static inline int
12252rb_isascii(int c)
12253{
12254 return '\0' <= c && c <= '\x7f';
12255}
12256
12257__attribute__((__const__))
12258
12259__attribute__((__artificial__))
12260static inline int
12261rb_isupper(int c)
12262{
12263 return 'A' <= c && c <= 'Z';
12264}
12265
12266__attribute__((__const__))
12267
12268__attribute__((__artificial__))
12269static inline int
12270rb_islower(int c)
12271{
12272 return 'a' <= c && c <= 'z';
12273}
12274
12275__attribute__((__const__))
12276
12277__attribute__((__artificial__))
12278static inline int
12279rb_isalpha(int c)
12280{
12281 return rb_isupper(c) || rb_islower(c);
12282}
12283
12284__attribute__((__const__))
12285
12286__attribute__((__artificial__))
12287static inline int
12288rb_isdigit(int c)
12289{
12290 return '0' <= c && c <= '9';
12291}
12292
12293__attribute__((__const__))
12294
12295__attribute__((__artificial__))
12296static inline int
12297rb_isalnum(int c)
12298{
12299 return rb_isalpha(c) || rb_isdigit(c);
12300}
12301
12302__attribute__((__const__))
12303
12304__attribute__((__artificial__))
12305static inline int
12306rb_isxdigit(int c)
12307{
12308 return rb_isdigit(c) || ('A' <= c && c <= 'F') || ('a' <= c && c <= 'f');
12309}
12310
12311__attribute__((__const__))
12312
12313__attribute__((__artificial__))
12314static inline int
12315rb_isblank(int c)
12316{
12317 return c == ' ' || c == '\t';
12318}
12319
12320__attribute__((__const__))
12321
12322__attribute__((__artificial__))
12323static inline int
12324rb_isspace(int c)
12325{
12326 return c == ' ' || ('\t' <= c && c <= '\r');
12327}
12328
12329__attribute__((__const__))
12330
12331__attribute__((__artificial__))
12332static inline int
12333rb_iscntrl(int c)
12334{
12335 return ('\0' <= c && c < ' ') || c == '\x7f';
12336}
12337
12338__attribute__((__const__))
12339
12340__attribute__((__artificial__))
12341static inline int
12342rb_isprint(int c)
12343{
12344 return ' ' <= c && c <= '\x7e';
12345}
12346
12347__attribute__((__const__))
12348
12349__attribute__((__artificial__))
12350static inline int
12351rb_ispunct(int c)
12352{
12353 return !rb_isalnum(c);
12354}
12355
12356__attribute__((__const__))
12357
12358__attribute__((__artificial__))
12359static inline int
12360rb_isgraph(int c)
12361{
12362 return '!' <= c && c <= '\x7e';
12363}
12364
12365__attribute__((__const__))
12366
12367__attribute__((__artificial__))
12368static inline int
12369rb_tolower(int c)
12370{
12371 return rb_isupper(c) ? (c|0x20) : c;
12372}
12373
12374__attribute__((__const__))
12375
12376__attribute__((__artificial__))
12377static inline int
12378rb_toupper(int c)
12379{
12380 return rb_islower(c) ? (c&0x5f) : c;
12381}
12382
12383
12384
12385
12386VALUE rb_eval_string(const char*);
12387VALUE rb_eval_string_protect(const char*, int*);
12388VALUE rb_eval_string_wrap(const char*, int*);
12389VALUE rb_funcall(VALUE, ID, int, ...);
12390VALUE rb_funcallv(VALUE, ID, int, const VALUE*);
12391VALUE rb_funcallv_kw(VALUE, ID, int, const VALUE*, int);
12392VALUE rb_funcallv_public(VALUE, ID, int, const VALUE*);
12393VALUE rb_funcallv_public_kw(VALUE, ID, int, const VALUE*, int);
12394VALUE rb_funcall_passing_block(VALUE, ID, int, const VALUE*);
12395VALUE rb_funcall_passing_block_kw(VALUE, ID, int, const VALUE*, int);
12396VALUE rb_funcall_with_block(VALUE, ID, int, const VALUE*, VALUE);
12397VALUE rb_funcall_with_block_kw(VALUE, ID, int, const VALUE*, VALUE, int);
12398VALUE rb_call_super(int, const VALUE*);
12399VALUE rb_call_super_kw(int, const VALUE*, int);
12400VALUE rb_current_receiver(void);
12401int rb_get_kwargs(VALUE keyword_hash, const ID *table, int required, int optional, VALUE *);
12402VALUE rb_extract_keywords(VALUE *orighash);
12403
12404
12405
12406
12407
12408
12409
12410
12411
12412
12413
12414
12415typedef uint32_t rb_event_flag_t;
12416typedef void (*rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass);
12417
12418void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data);
12420
12421
12422
12423
12424void rb_global_variable(VALUE*);
12425void rb_gc_register_mark_object(VALUE);
12426void rb_gc_register_address(VALUE*);
12427void rb_gc_unregister_address(VALUE*);
12428
12429
12430
12431typedef int ruby_glob_func(const char*,VALUE, void*);
12432void rb_glob(const char*,void(*)(const char*,VALUE,void*),VALUE);
12433int ruby_glob(const char*,int,ruby_glob_func*,VALUE);
12434int ruby_brace_glob(const char*,int,ruby_glob_func*,VALUE);
12435
12436
12437
12438
12439extern VALUE rb_mKernel;
12440extern VALUE rb_mComparable;
12441extern VALUE rb_mEnumerable;
12442extern VALUE rb_mErrno;
12443extern VALUE rb_mFileTest;
12444extern VALUE rb_mGC;
12445extern VALUE rb_mMath;
12446extern VALUE rb_mProcess;
12447extern VALUE rb_mWaitReadable;
12448extern VALUE rb_mWaitWritable;
12449
12450extern VALUE rb_cBasicObject;
12451extern VALUE rb_cObject;
12452extern VALUE rb_cArray;
12453extern VALUE rb_cBinding;
12454extern VALUE rb_cClass;
12455extern VALUE rb_cCont;
12456extern VALUE rb_cData;
12457extern VALUE rb_cDir;
12458extern VALUE rb_cEncoding;
12459extern VALUE rb_cEnumerator;
12460extern VALUE rb_cFalseClass;
12461extern VALUE rb_cFile;
12462extern VALUE rb_cComplex;
12463extern VALUE rb_cFloat;
12464extern VALUE rb_cHash;
12465extern VALUE rb_cIO;
12466extern VALUE rb_cInteger;
12467extern VALUE rb_cMatch;
12468extern VALUE rb_cMethod;
12469extern VALUE rb_cModule;
12470extern VALUE rb_cNameErrorMesg;
12471extern VALUE rb_cNilClass;
12472extern VALUE rb_cNumeric;
12473extern VALUE rb_cProc;
12474extern VALUE rb_cRandom;
12475extern VALUE rb_cRange;
12476extern VALUE rb_cRational;
12477extern VALUE rb_cRegexp;
12478extern VALUE rb_cStat;
12479extern VALUE rb_cString;
12480extern VALUE rb_cStruct;
12481extern VALUE rb_cSymbol;
12482extern VALUE rb_cThread;
12483extern VALUE rb_cTime;
12484extern VALUE rb_cTrueClass;
12485extern VALUE rb_cUnboundMethod;
12486
12487extern VALUE rb_eException;
12488extern VALUE rb_eStandardError;
12489extern VALUE rb_eSystemExit;
12490extern VALUE rb_eInterrupt;
12491extern VALUE rb_eSignal;
12492extern VALUE rb_eFatal;
12493extern VALUE rb_eArgError;
12494extern VALUE rb_eEOFError;
12495extern VALUE rb_eIndexError;
12496extern VALUE rb_eStopIteration;
12497extern VALUE rb_eKeyError;
12498extern VALUE rb_eRangeError;
12499extern VALUE rb_eIOError;
12500extern VALUE rb_eRuntimeError;
12501extern VALUE rb_eFrozenError;
12502extern VALUE rb_eSecurityError;
12503extern VALUE rb_eSystemCallError;
12504extern VALUE rb_eThreadError;
12505extern VALUE rb_eTypeError;
12506extern VALUE rb_eZeroDivError;
12507extern VALUE rb_eNotImpError;
12508extern VALUE rb_eNoMemError;
12509extern VALUE rb_eNoMethodError;
12510extern VALUE rb_eFloatDomainError;
12511extern VALUE rb_eLocalJumpError;
12512extern VALUE rb_eSysStackError;
12513extern VALUE rb_eRegexpError;
12514extern VALUE rb_eEncodingError;
12515extern VALUE rb_eEncCompatError;
12516extern VALUE rb_eNoMatchingPatternError;
12517
12518extern VALUE rb_eScriptError;
12519extern VALUE rb_eNameError;
12520extern VALUE rb_eSyntaxError;
12521extern VALUE rb_eLoadError;
12522
12523extern VALUE rb_eMathDomainError;
12524
12526
12527__attribute__((__pure__))
12528static inline VALUE
12529rb_class_of(VALUE obj)
12530{
12531 if (! RB_SPECIAL_CONST_P(obj)) {
12532 return RBASIC_CLASS(obj);
12533 }
12534 else if (obj == ((VALUE)RUBY_Qfalse)) {
12535 return rb_cFalseClass;
12536 }
12537 else if (obj == ((VALUE)RUBY_Qnil)) {
12538 return rb_cNilClass;
12539 }
12540 else if (obj == ((VALUE)RUBY_Qtrue)) {
12541 return rb_cTrueClass;
12542 }
12543 else if (RB_FIXNUM_P(obj)) {
12544 return rb_cInteger;
12545 }
12546 else if (RB_STATIC_SYM_P(obj)) {
12547 return rb_cSymbol;
12548 }
12549 else if (RB_FLONUM_P(obj)) {
12550 return rb_cFloat;
12551 }
12552
12553
12554 __builtin_unreachable();
12555
12556
12557
12558}
12559
12560
12561
12562
12563void ruby_sysinit(int *argc, char ***argv);
12564void ruby_init(void);
12565void* ruby_options(int argc, char** argv);
12566int ruby_executable_node(void *n, int *status);
12567int ruby_run_node(void *n);
12568
12569
12570void ruby_show_version(void);
12571
12572void ruby_show_copyright(void);
12573
12574
12575
12576
12577
12578
12579
12580
12581void ruby_init_stack(volatile VALUE*);
12582
12583int ruby_setup(void);
12584int ruby_cleanup(volatile int);
12585
12586void ruby_finalize(void);
12587
12588__declspec(noreturn)
12589void ruby_stop(int);
12590
12591void ruby_set_stack_size(size_t);
12592int ruby_stack_check(void);
12593size_t ruby_stack_length(VALUE**);
12594
12595int ruby_exec_node(void *n);
12596
12597void ruby_script(const char* name);
12598void ruby_set_script_name(VALUE name);
12599
12600void ruby_prog_init(void);
12601void ruby_set_argv(int, char**);
12602void *ruby_process_options(int, char**);
12603void ruby_init_loadpath(void);
12604void ruby_incpush(const char*);
12605void ruby_sig_finalize(void);
12606
12607
12608
12609
12610
12611
12612typedef VALUE rb_block_call_func(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg);
12614
12615VALUE rb_each(VALUE);
12616VALUE rb_yield(VALUE);
12617VALUE rb_yield_values(int n, ...);
12618VALUE rb_yield_values2(int n, const VALUE *argv);
12619VALUE rb_yield_values_kw(int n, const VALUE *argv, int kw_splat);
12620VALUE rb_yield_splat(VALUE);
12621VALUE rb_yield_splat_kw(VALUE, int);
12622VALUE rb_yield_block(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg);
12623int rb_keyword_given_p(void);
12624int rb_block_given_p(void);
12625void rb_need_block(void);
12626VALUE rb_iterate(VALUE(*)(VALUE),VALUE,rb_block_call_func_t,VALUE);
12627VALUE rb_block_call(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE);
12628VALUE rb_block_call_kw(VALUE,ID,int,const VALUE*,rb_block_call_func_t,VALUE,int);
12629VALUE rb_rescue(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE);
12630VALUE rb_rescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,...);
12631VALUE rb_vrescue2(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE,VALUE),VALUE,va_list);
12632VALUE rb_ensure(VALUE(*)(VALUE),VALUE,VALUE(*)(VALUE),VALUE);
12633VALUE rb_catch(const char*,rb_block_call_func_t,VALUE);
12634VALUE rb_catch_obj(VALUE,rb_block_call_func_t,VALUE);
12635
12636__declspec(noreturn)
12637void rb_throw(const char*,VALUE);
12638
12639__declspec(noreturn)
12640void rb_throw_obj(VALUE,VALUE);
12641
12642
12643
12644
12645
12646
12647
12648
12649
12650
12651
12652
12653
12654
12655
12656
12657
12658
12659
12660
12661
12662
12663
12664
12665
12666
12667
12668
12670 _Bool left;
12671 size_t right;
12672};
12673
12674__attribute__((__malloc__))
12675__attribute__((__returns_nonnull__))
12676__attribute__((__alloc_size__ (2)))
12677void *rb_alloc_tmp_buffer(volatile VALUE *store, long len);
12678
12679__attribute__((__malloc__))
12680__attribute__((__returns_nonnull__))
12681__attribute__((__alloc_size__ (2,3)))
12682void *rb_alloc_tmp_buffer_with_count(volatile VALUE *store, size_t len,size_t count);
12683
12684void rb_free_tmp_buffer(volatile VALUE *store);
12685
12686__declspec(noreturn)
12687void ruby_malloc_size_overflow(size_t, size_t);
12688
12689
12690
12691
12692static inline int
12693rb_mul_size_overflow(size_t a, size_t b, size_t max, size_t *c)
12694{
12695
12696 __extension__ unsigned __int128 da, db, c2;
12697 da = a;
12698 db = b;
12699 c2 = da * db;
12700 if (c2 > max) return 1;
12701 *c = ((size_t)c2);
12702
12703
12704
12705
12706 return 0;
12707}
12708
12709
12710
12711
12712
12713
12714__attribute__((__const__))
12715static inline struct rbimpl_size_mul_overflow_tag
12716rbimpl_size_mul_overflow(size_t x, size_t y)
12717{
12718 struct rbimpl_size_mul_overflow_tag ret = { 0, 0, };
12719
12720
12721 ret.left = __builtin_mul_overflow(x, y, &ret.right);
12722 return ret;
12723}
12724
12725static inline size_t
12726rbimpl_size_mul_or_raise(size_t x, size_t y)
12727{
12728 struct rbimpl_size_mul_overflow_tag size =
12729 rbimpl_size_mul_overflow(x, y);
12730
12731 if ((__builtin_expect(!!(! size.left), 1))) {
12732 return size.right;
12733 }
12734 else {
12735 ruby_malloc_size_overflow(x, y);
12736 __builtin_unreachable();
12737 }
12738}
12739
12740static inline void *
12741rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize)
12742{
12743 return rb_alloc_tmp_buffer_with_count(
12744 store, rbimpl_size_mul_or_raise(count, elsize), count);
12745}
12746
12747
12748__declspec(noalias)
12749__attribute__((__nonnull__ (1)))
12750__attribute__((__returns_nonnull__))
12751
12752
12753
12754static inline void *
12755ruby_nonempty_memcpy(void *dest, const void *src, size_t n)
12756{
12757 if (n) {
12758 return memcpy(dest, src, n);
12759 }
12760 else {
12761 return dest;
12762 }
12763}
12764
12765
12766
12767VALUE rb_define_class(const char*,VALUE);
12768VALUE rb_define_module(const char*);
12769VALUE rb_define_class_under(VALUE, const char*, VALUE);
12770VALUE rb_define_module_under(VALUE, const char*);
12771
12772void rb_include_module(VALUE,VALUE);
12773void rb_extend_object(VALUE,VALUE);
12774void rb_prepend_module(VALUE,VALUE);
12775
12776
12777
12778
12779VALUE rb_newobj(void);
12780VALUE rb_newobj_of(VALUE, VALUE);
12781VALUE rb_obj_setup(VALUE obj, VALUE klass, VALUE type);
12782VALUE rb_obj_class(VALUE);
12783VALUE rb_singleton_class_clone(VALUE);
12784void rb_singleton_class_attached(VALUE,VALUE);
12785void rb_copy_generic_ivar(VALUE,VALUE);
12786
12787static inline void
12788rb_clone_setup(VALUE clone, VALUE obj)
12789{
12790 ((void)0);
12791 ((void)0);
12792
12794 rb_obj_setup(clone, rb_singleton_class_clone(obj),
12795 RB_FL_TEST_RAW(obj, ~flags));
12796 rb_singleton_class_attached(RBASIC_CLASS(clone), clone);
12797 if (RB_FL_TEST(obj, RUBY_FL_EXIVAR)) rb_copy_generic_ivar(clone, obj);
12798}
12799
12800static inline void
12801rb_dup_setup(VALUE dup, VALUE obj)
12802{
12803 ((void)0);
12804 ((void)0);
12805
12806 rb_obj_setup(dup, rb_obj_class(obj), RB_FL_TEST_RAW(obj, RUBY_FL_DUPPED));
12807 if (RB_FL_TEST(obj, RUBY_FL_EXIVAR)) rb_copy_generic_ivar(dup, obj);
12808}
12809
12810
12811
12812
12813
12814
12815
12816
12817
12818
12819
12820
12821void rb_mem_clear(VALUE*, long);
12822VALUE rb_assoc_new(VALUE, VALUE);
12823VALUE rb_check_array_type(VALUE);
12824VALUE rb_ary_new(void);
12825VALUE rb_ary_new_capa(long capa);
12826VALUE rb_ary_new_from_args(long n, ...);
12827VALUE rb_ary_new_from_values(long n, const VALUE *elts);
12828VALUE rb_ary_tmp_new(long);
12829void rb_ary_free(VALUE);
12830void rb_ary_modify(VALUE);
12831VALUE rb_ary_freeze(VALUE);
12832VALUE rb_ary_shared_with_p(VALUE, VALUE);
12833VALUE rb_ary_aref(int, const VALUE*, VALUE);
12834VALUE rb_ary_subseq(VALUE, long, long);
12835void rb_ary_store(VALUE, long, VALUE);
12836VALUE rb_ary_dup(VALUE);
12837VALUE rb_ary_resurrect(VALUE ary);
12838VALUE rb_ary_to_ary(VALUE);
12839VALUE rb_ary_to_s(VALUE);
12840VALUE rb_ary_cat(VALUE, const VALUE *, long);
12841VALUE rb_ary_push(VALUE, VALUE);
12842VALUE rb_ary_pop(VALUE);
12843VALUE rb_ary_shift(VALUE);
12844VALUE rb_ary_unshift(VALUE, VALUE);
12845VALUE rb_ary_entry(VALUE, long);
12846VALUE rb_ary_each(VALUE);
12847VALUE rb_ary_join(VALUE, VALUE);
12848VALUE rb_ary_reverse(VALUE);
12849VALUE rb_ary_rotate(VALUE, long);
12850VALUE rb_ary_sort(VALUE);
12851VALUE rb_ary_sort_bang(VALUE);
12852VALUE rb_ary_delete(VALUE, VALUE);
12853VALUE rb_ary_delete_at(VALUE, long);
12854VALUE rb_ary_clear(VALUE);
12855VALUE rb_ary_plus(VALUE, VALUE);
12856VALUE rb_ary_concat(VALUE, VALUE);
12857VALUE rb_ary_assoc(VALUE, VALUE);
12858VALUE rb_ary_rassoc(VALUE, VALUE);
12859VALUE rb_ary_includes(VALUE, VALUE);
12860VALUE rb_ary_cmp(VALUE, VALUE);
12861VALUE rb_ary_replace(VALUE copy, VALUE orig);
12862VALUE rb_get_values_at(VALUE, long, int, const VALUE*, VALUE(*)(VALUE,long));
12863VALUE rb_ary_resize(VALUE ary, long len);
12864
12865
12866
12867
12868
12869VALUE rb_exc_new(VALUE, const char*, long);
12870VALUE rb_exc_new_cstr(VALUE, const char*);
12871VALUE rb_exc_new_str(VALUE, VALUE);
12872__attribute__((__format__(__printf__, (1), (2)))) __declspec(noreturn) void rb_loaderror(const char*, ...);
12873__attribute__((__format__(__printf__, (2), (3)))) __declspec(noreturn) void rb_loaderror_with_path(VALUE path, const char*, ...);
12874__attribute__((__format__(__printf__, (2), (3)))) __declspec(noreturn) void rb_name_error(ID, const char*, ...);
12875__attribute__((__format__(__printf__, (2), (3)))) __declspec(noreturn) void rb_name_error_str(VALUE, const char*, ...);
12876__attribute__((__format__(__printf__, (2), (3)))) __declspec(noreturn) void rb_frozen_error_raise(VALUE, const char*, ...);
12877__declspec(noreturn) void rb_invalid_str(const char*, const char*);
12878__declspec(noreturn) void rb_error_frozen(const char*);
12879__declspec(noreturn) void rb_error_frozen_object(VALUE);
12880void rb_error_untrusted(VALUE);
12881void rb_check_frozen(VALUE);
12882void rb_check_trusted(VALUE);
12883void rb_check_copyable(VALUE obj, VALUE orig);
12884__declspec(noreturn) static void rb_error_arity(int, int, int);
12885
12886
12887
12888
12889
12890
12891
12892
12893static inline void
12894rb_check_frozen_inline(VALUE obj)
12895{
12896 if ((__builtin_expect(!!(RB_OBJ_FROZEN(obj)), 0))) {
12898 }
12899}
12900
12901static inline int
12902rb_check_arity(int argc, int min, int max)
12903{
12904 if ((argc < min) || (max != (-1) && argc > max))
12905 rb_error_arity(argc, min, max);
12906 return argc;
12907}
12908
12909
12910
12911void rb_st_foreach_safe(struct st_table *, int (*)(st_data_t, st_data_t, st_data_t), st_data_t);
12912VALUE rb_check_hash_type(VALUE);
12913void rb_hash_foreach(VALUE, int (*)(VALUE, VALUE, VALUE), VALUE);
12914VALUE rb_hash(VALUE);
12915VALUE rb_hash_new(void);
12916VALUE rb_hash_dup(VALUE);
12917VALUE rb_hash_freeze(VALUE);
12918VALUE rb_hash_aref(VALUE, VALUE);
12919VALUE rb_hash_lookup(VALUE, VALUE);
12920VALUE rb_hash_lookup2(VALUE, VALUE, VALUE);
12921VALUE rb_hash_fetch(VALUE, VALUE);
12922VALUE rb_hash_aset(VALUE, VALUE, VALUE);
12923VALUE rb_hash_clear(VALUE);
12924VALUE rb_hash_delete_if(VALUE);
12925VALUE rb_hash_delete(VALUE,VALUE);
12926VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone);
12927void rb_hash_bulk_insert(long, const VALUE *, VALUE);
12928typedef VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value);
12929VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func);
12930struct st_table *rb_hash_tbl(VALUE, const char *file, int line);
12931int rb_path_check(const char*);
12932int rb_env_path_tainted(void);
12933VALUE rb_env_clear(void);
12934VALUE rb_hash_size(VALUE);
12935void rb_hash_free(VALUE);
12936
12937
12938
12939
12940VALUE rb_block_proc(void);
12941VALUE rb_block_lambda(void);
12942VALUE rb_proc_new(rb_block_call_func_t, VALUE);
12943VALUE rb_obj_is_proc(VALUE);
12944VALUE rb_proc_call(VALUE, VALUE);
12945VALUE rb_proc_call_kw(VALUE, VALUE, int);
12946VALUE rb_proc_call_with_block(VALUE, int argc, const VALUE *argv, VALUE);
12947VALUE rb_proc_call_with_block_kw(VALUE, int argc, const VALUE *argv, VALUE, int);
12948int rb_proc_arity(VALUE);
12949VALUE rb_proc_lambda_p(VALUE);
12950VALUE rb_binding_new(void);
12951VALUE rb_obj_method(VALUE, VALUE);
12952VALUE rb_obj_is_method(VALUE);
12953VALUE rb_method_call(int, const VALUE*, VALUE);
12954VALUE rb_method_call_kw(int, const VALUE*, VALUE, int);
12955VALUE rb_method_call_with_block(int, const VALUE *, VALUE, VALUE);
12956VALUE rb_method_call_with_block_kw(int, const VALUE *, VALUE, VALUE, int);
12957int rb_mod_method_arity(VALUE, ID);
12958int rb_obj_method_arity(VALUE, ID);
12959VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
12960
12961
12962
12963
12964
12965
12966
12967
12968
12969int rb_scan_args(int, const VALUE*, const char*, ...);
12970int rb_scan_args_kw(int, int, const VALUE*, const char*, ...);
12971
12972
12973void rb_scan_args_bad_format(const char*);
12974
12975
12976void rb_scan_args_length_mismatch(const char*,int);
12977
12978
12979
12980
12981
12982
12983
12984
12985
12986
12987
12988
12989
12990
12991
12992
12993
12994
12995
12996
12997
12998
12999
13000
13001
13002
13003
13004
13005
13006
13007
13008
13009
13010
13011
13012static inline _Bool
13013rb_scan_args_keyword_p(int kw_flag, VALUE last)
13014{
13015 switch (kw_flag) {
13016 case 0:
13017 return !! rb_keyword_given_p();
13018 case 1:
13019 return 1;
13020 case 3:
13021 return (__builtin_constant_p(RUBY_T_HASH) ? rbimpl_RB_TYPE_P_fastpath((last), (RUBY_T_HASH)) : (RB_TYPE_P)((last), (RUBY_T_HASH)));
13022 default:
13023 return 0;
13024 }
13025}
13026
13027__attribute__((__always_inline__)) inline
13028static _Bool
13029rb_scan_args_lead_p(const char *fmt)
13030{
13031 return (((unsigned char)((fmt[0])-'0'))<10);
13032}
13033
13034__attribute__((__always_inline__)) inline
13035static int
13036rb_scan_args_n_lead(const char *fmt)
13037{
13038 return (rb_scan_args_lead_p(fmt) ? fmt[0]-'0' : 0);
13039}
13040
13041__attribute__((__always_inline__)) inline
13042static _Bool
13043rb_scan_args_opt_p(const char *fmt)
13044{
13045 return (rb_scan_args_lead_p(fmt) && (((unsigned char)((fmt[1])-'0'))<10));
13046}
13047
13048__attribute__((__always_inline__)) inline
13049static int
13050rb_scan_args_n_opt(const char *fmt)
13051{
13052 return (rb_scan_args_opt_p(fmt) ? fmt[1]-'0' : 0);
13053}
13054
13055__attribute__((__always_inline__)) inline
13056static int
13057rb_scan_args_var_idx(const char *fmt)
13058{
13059 return (!rb_scan_args_lead_p(fmt) ? 0 : !(((unsigned char)((fmt[1])-'0'))<10) ? 1 : 2);
13060}
13061
13062__attribute__((__always_inline__)) inline
13063static _Bool
13064rb_scan_args_f_var(const char *fmt)
13065{
13066 return (fmt[rb_scan_args_var_idx(fmt)]=='*');
13067}
13068
13069__attribute__((__always_inline__)) inline
13070static int
13071rb_scan_args_trail_idx(const char *fmt)
13072{
13073 const int idx = rb_scan_args_var_idx(fmt);
13074 return idx+(fmt[idx]=='*');
13075}
13076
13077__attribute__((__always_inline__)) inline
13078static int
13079rb_scan_args_n_trail(const char *fmt)
13080{
13081 const int idx = rb_scan_args_trail_idx(fmt);
13082 return ((((unsigned char)((fmt[idx])-'0'))<10) ? fmt[idx]-'0' : 0);
13083}
13084
13085__attribute__((__always_inline__)) inline
13086static int
13087rb_scan_args_hash_idx(const char *fmt)
13088{
13089 const int idx = rb_scan_args_trail_idx(fmt);
13090 return idx+(((unsigned char)((fmt[idx])-'0'))<10);
13091}
13092
13093__attribute__((__always_inline__)) inline
13094static _Bool
13095rb_scan_args_f_hash(const char *fmt)
13096{
13097 return (fmt[rb_scan_args_hash_idx(fmt)]==':');
13098}
13099
13100__attribute__((__always_inline__)) inline
13101static int
13102rb_scan_args_block_idx(const char *fmt)
13103{
13104 const int idx = rb_scan_args_hash_idx(fmt);
13105 return idx+(fmt[idx]==':');
13106}
13107
13108__attribute__((__always_inline__)) inline
13109static _Bool
13110rb_scan_args_f_block(const char *fmt)
13111{
13112 return (fmt[rb_scan_args_block_idx(fmt)]=='&');
13113}
13114__attribute__((__always_inline__)) inline
13115static int
13116rb_scan_args_set(int kw_flag, int argc, const VALUE *argv,
13117 int n_lead, int n_opt, int n_trail,
13118 _Bool f_var, _Bool f_hash, _Bool f_block,
13119 VALUE *vars[], const char *fmt __attribute__((__unused__)), int varc __attribute__((__unused__)))
13120 __attribute__((__diagnose_if__((!(((unsigned char)(((fmt)[0])-'0'))<10) ? ((fmt)[0]!='*' ? (!(((unsigned char)(((fmt)[0])-'0'))<10) ? ((fmt)[0]!=':' ? ((fmt)[0]!='&' ? ((fmt)[0] ? -1 : (0)) : ((fmt)[(0)+1] ? -1 : ((0)+1))) : ((fmt)[(0)+1]!='&' ? ((fmt)[(0)+1] ? -1 : ((0)+1)) : ((fmt)[((0)+1)+1] ? -1 : (((0)+1)+1)))) : ((fmt)[(0)+1]!=':' ? ((fmt)[(0)+1]!='&' ? ((fmt)[(0)+1] ? -1 : ((0)+((fmt)[0]-'0'))) : ((fmt)[((0)+1)+1] ? -1 : (((0)+((fmt)[0]-'0'))+1))) : ((fmt)[((0)+1)+1]!='&' ? ((fmt)[((0)+1)+1] ? -1 : (((0)+((fmt)[0]-'0'))+1)) : ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+((fmt)[0]-'0'))+1)+1))))) : (!(((unsigned char)(((fmt)[(0)+1])-'0'))<10) ? ((fmt)[(0)+1]!=':' ? ((fmt)[(0)+1]!='&' ? ((fmt)[(0)+1] ? -1 : ((0)+1)) : ((fmt)[((0)+1)+1] ? -1 : (((0)+1)+1))) : ((fmt)[((0)+1)+1]!='&' ? ((fmt)[((0)+1)+1] ? -1 : (((0)+1)+1)) : ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+1)+1)+1)))) : ((fmt)[((0)+1)+1]!=':' ? ((fmt)[((0)+1)+1]!='&' ? ((fmt)[((0)+1)+1] ? -1 : (((0)+1)+((fmt)[(0)+1]-'0'))) : ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+1)+((fmt)[(0)+1]-'0'))+1))) : ((fmt)[(((0)+1)+1)+1]!='&' ? ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+1)+((fmt)[(0)+1]-'0'))+1)) : ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+1)+((fmt)[(0)+1]-'0'))+1)+1)))))) : (!(((unsigned char)(((fmt)[(0)+1])-'0'))<10) ? ((fmt)[(0)+1]!='*' ? (!(((unsigned char)(((fmt)[(0)+1])-'0'))<10) ? ((fmt)[(0)+1]!=':' ? ((fmt)[(0)+1]!='&' ? ((fmt)[(0)+1] ? -1 : ((0)+(fmt)[0]-'0')) : ((fmt)[((0)+1)+1] ? -1 : (((0)+(fmt)[0]-'0')+1))) : ((fmt)[((0)+1)+1]!='&' ? ((fmt)[((0)+1)+1] ? -1 : (((0)+(fmt)[0]-'0')+1)) : ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+1)+1)))) : ((fmt)[((0)+1)+1]!=':' ? ((fmt)[((0)+1)+1]!='&' ? ((fmt)[((0)+1)+1] ? -1 : (((0)+(fmt)[0]-'0')+((fmt)[(0)+1]-'0'))) : ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+((fmt)[(0)+1]-'0'))+1))) : ((fmt)[(((0)+1)+1)+1]!='&' ? ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+((fmt)[(0)+1]-'0'))+1)) : ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+((fmt)[(0)+1]-'0'))+1)+1))))) : (!(((unsigned char)(((fmt)[((0)+1)+1])-'0'))<10) ? ((fmt)[((0)+1)+1]!=':' ? ((fmt)[((0)+1)+1]!='&' ? ((fmt)[((0)+1)+1] ? -1 : (((0)+(fmt)[0]-'0')+1)) : ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+1)+1))) : ((fmt)[(((0)+1)+1)+1]!='&' ? ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+1)+1)) : ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+1)+1)+1)))) : ((fmt)[(((0)+1)+1)+1]!=':' ? ((fmt)[(((0)+1)+1)+1]!='&' ? ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+1)+((fmt)[((0)+1)+1]-'0'))) : ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+1)+((fmt)[((0)+1)+1]-'0'))+1))) : ((fmt)[((((0)+1)+1)+1)+1]!='&' ? ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+1)+((fmt)[((0)+1)+1]-'0'))+1)) : ((fmt)[(((((0)+1)+1)+1)+1)+1] ? -1 : ((((((0)+(fmt)[0]-'0')+1)+((fmt)[((0)+1)+1]-'0'))+1)+1)))))) : ((fmt)[((0)+1)+1]!='*' ? (!(((unsigned char)(((fmt)[((0)+1)+1])-'0'))<10) ? ((fmt)[((0)+1)+1]!=':' ? ((fmt)[((0)+1)+1]!='&' ? ((fmt)[((0)+1)+1] ? -1 : (((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')) : ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1))) : ((fmt)[(((0)+1)+1)+1]!='&' ? ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)) : ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)+1)))) : ((fmt)[(((0)+1)+1)+1]!=':' ? ((fmt)[(((0)+1)+1)+1]!='&' ? ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+((fmt)[((0)+1)+1]-'0'))) : ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+((fmt)[((0)+1)+1]-'0'))+1))) : ((fmt)[((((0)+1)+1)+1)+1]!='&' ? ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+((fmt)[((0)+1)+1]-'0'))+1)) : ((fmt)[(((((0)+1)+1)+1)+1)+1] ? -1 : ((((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+((fmt)[((0)+1)+1]-'0'))+1)+1))))) : (!(((unsigned char)(((fmt)[(((0)+1)+1)+1])-'0'))<10) ? ((fmt)[(((0)+1)+1)+1]!=':' ? ((fmt)[(((0)+1)+1)+1]!='&' ? ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)) : ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)+1))) : ((fmt)[((((0)+1)+1)+1)+1]!='&' ? ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)+1)) : ((fmt)[(((((0)+1)+1)+1)+1)+1] ? -1 : ((((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)+1)+1)))) : ((fmt)[((((0)+1)+1)+1)+1]!=':' ? ((fmt)[((((0)+1)+1)+1)+1]!='&' ? ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)+((fmt)[(((0)+1)+1)+1]-'0'))) : ((fmt)[(((((0)+1)+1)+1)+1)+1] ? -1 : ((((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)+((fmt)[(((0)+1)+1)+1]-'0'))+1))) : ((fmt)[(((((0)+1)+1)+1)+1)+1]!='&' ? ((fmt)[(((((0)+1)+1)+1)+1)+1] ? -1 : ((((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)+((fmt)[(((0)+1)+1)+1]-'0'))+1)) : ((fmt)[((((((0)+1)+1)+1)+1)+1)+1] ? -1 : (((((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)+((fmt)[(((0)+1)+1)+1]-'0'))+1)+1)))))))) < 0, "bad scan arg format", "error")))
13121 __attribute__((__diagnose_if__((!(((unsigned char)(((fmt)[0])-'0'))<10) ? ((fmt)[0]!='*' ? (!(((unsigned char)(((fmt)[0])-'0'))<10) ? ((fmt)[0]!=':' ? ((fmt)[0]!='&' ? ((fmt)[0] ? -1 : (0)) : ((fmt)[(0)+1] ? -1 : ((0)+1))) : ((fmt)[(0)+1]!='&' ? ((fmt)[(0)+1] ? -1 : ((0)+1)) : ((fmt)[((0)+1)+1] ? -1 : (((0)+1)+1)))) : ((fmt)[(0)+1]!=':' ? ((fmt)[(0)+1]!='&' ? ((fmt)[(0)+1] ? -1 : ((0)+((fmt)[0]-'0'))) : ((fmt)[((0)+1)+1] ? -1 : (((0)+((fmt)[0]-'0'))+1))) : ((fmt)[((0)+1)+1]!='&' ? ((fmt)[((0)+1)+1] ? -1 : (((0)+((fmt)[0]-'0'))+1)) : ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+((fmt)[0]-'0'))+1)+1))))) : (!(((unsigned char)(((fmt)[(0)+1])-'0'))<10) ? ((fmt)[(0)+1]!=':' ? ((fmt)[(0)+1]!='&' ? ((fmt)[(0)+1] ? -1 : ((0)+1)) : ((fmt)[((0)+1)+1] ? -1 : (((0)+1)+1))) : ((fmt)[((0)+1)+1]!='&' ? ((fmt)[((0)+1)+1] ? -1 : (((0)+1)+1)) : ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+1)+1)+1)))) : ((fmt)[((0)+1)+1]!=':' ? ((fmt)[((0)+1)+1]!='&' ? ((fmt)[((0)+1)+1] ? -1 : (((0)+1)+((fmt)[(0)+1]-'0'))) : ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+1)+((fmt)[(0)+1]-'0'))+1))) : ((fmt)[(((0)+1)+1)+1]!='&' ? ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+1)+((fmt)[(0)+1]-'0'))+1)) : ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+1)+((fmt)[(0)+1]-'0'))+1)+1)))))) : (!(((unsigned char)(((fmt)[(0)+1])-'0'))<10) ? ((fmt)[(0)+1]!='*' ? (!(((unsigned char)(((fmt)[(0)+1])-'0'))<10) ? ((fmt)[(0)+1]!=':' ? ((fmt)[(0)+1]!='&' ? ((fmt)[(0)+1] ? -1 : ((0)+(fmt)[0]-'0')) : ((fmt)[((0)+1)+1] ? -1 : (((0)+(fmt)[0]-'0')+1))) : ((fmt)[((0)+1)+1]!='&' ? ((fmt)[((0)+1)+1] ? -1 : (((0)+(fmt)[0]-'0')+1)) : ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+1)+1)))) : ((fmt)[((0)+1)+1]!=':' ? ((fmt)[((0)+1)+1]!='&' ? ((fmt)[((0)+1)+1] ? -1 : (((0)+(fmt)[0]-'0')+((fmt)[(0)+1]-'0'))) : ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+((fmt)[(0)+1]-'0'))+1))) : ((fmt)[(((0)+1)+1)+1]!='&' ? ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+((fmt)[(0)+1]-'0'))+1)) : ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+((fmt)[(0)+1]-'0'))+1)+1))))) : (!(((unsigned char)(((fmt)[((0)+1)+1])-'0'))<10) ? ((fmt)[((0)+1)+1]!=':' ? ((fmt)[((0)+1)+1]!='&' ? ((fmt)[((0)+1)+1] ? -1 : (((0)+(fmt)[0]-'0')+1)) : ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+1)+1))) : ((fmt)[(((0)+1)+1)+1]!='&' ? ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+1)+1)) : ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+1)+1)+1)))) : ((fmt)[(((0)+1)+1)+1]!=':' ? ((fmt)[(((0)+1)+1)+1]!='&' ? ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+1)+((fmt)[((0)+1)+1]-'0'))) : ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+1)+((fmt)[((0)+1)+1]-'0'))+1))) : ((fmt)[((((0)+1)+1)+1)+1]!='&' ? ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+1)+((fmt)[((0)+1)+1]-'0'))+1)) : ((fmt)[(((((0)+1)+1)+1)+1)+1] ? -1 : ((((((0)+(fmt)[0]-'0')+1)+((fmt)[((0)+1)+1]-'0'))+1)+1)))))) : ((fmt)[((0)+1)+1]!='*' ? (!(((unsigned char)(((fmt)[((0)+1)+1])-'0'))<10) ? ((fmt)[((0)+1)+1]!=':' ? ((fmt)[((0)+1)+1]!='&' ? ((fmt)[((0)+1)+1] ? -1 : (((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')) : ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1))) : ((fmt)[(((0)+1)+1)+1]!='&' ? ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)) : ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)+1)))) : ((fmt)[(((0)+1)+1)+1]!=':' ? ((fmt)[(((0)+1)+1)+1]!='&' ? ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+((fmt)[((0)+1)+1]-'0'))) : ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+((fmt)[((0)+1)+1]-'0'))+1))) : ((fmt)[((((0)+1)+1)+1)+1]!='&' ? ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+((fmt)[((0)+1)+1]-'0'))+1)) : ((fmt)[(((((0)+1)+1)+1)+1)+1] ? -1 : ((((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+((fmt)[((0)+1)+1]-'0'))+1)+1))))) : (!(((unsigned char)(((fmt)[(((0)+1)+1)+1])-'0'))<10) ? ((fmt)[(((0)+1)+1)+1]!=':' ? ((fmt)[(((0)+1)+1)+1]!='&' ? ((fmt)[(((0)+1)+1)+1] ? -1 : ((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)) : ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)+1))) : ((fmt)[((((0)+1)+1)+1)+1]!='&' ? ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)+1)) : ((fmt)[(((((0)+1)+1)+1)+1)+1] ? -1 : ((((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)+1)+1)))) : ((fmt)[((((0)+1)+1)+1)+1]!=':' ? ((fmt)[((((0)+1)+1)+1)+1]!='&' ? ((fmt)[((((0)+1)+1)+1)+1] ? -1 : (((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)+((fmt)[(((0)+1)+1)+1]-'0'))) : ((fmt)[(((((0)+1)+1)+1)+1)+1] ? -1 : ((((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)+((fmt)[(((0)+1)+1)+1]-'0'))+1))) : ((fmt)[(((((0)+1)+1)+1)+1)+1]!='&' ? ((fmt)[(((((0)+1)+1)+1)+1)+1] ? -1 : ((((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)+((fmt)[(((0)+1)+1)+1]-'0'))+1)) : ((fmt)[((((((0)+1)+1)+1)+1)+1)+1] ? -1 : (((((((0)+(fmt)[0]-'0')+(fmt)[(0)+1]-'0')+1)+((fmt)[(((0)+1)+1)+1]-'0'))+1)+1)))))))) != varc, "variable argument length doesn't match", "error")))
13122{
13123 int i, argi = 0, vari = 0;
13124 VALUE *var, hash = ((VALUE)RUBY_Qnil);
13125 const int n_mand = n_lead + n_trail;
13126
13127
13128 if (f_hash && argc > 0) {
13129 VALUE last = argv[argc - 1];
13130 if (rb_scan_args_keyword_p(kw_flag, last)) {
13131 hash = rb_hash_dup(last);
13132 argc--;
13133 }
13134 }
13135
13136 if (argc < n_mand) {
13137 goto argc_error;
13138 }
13139
13140
13141 for (i = 0; i < n_lead; i++) {
13142 var = vars[vari++];
13143 if (var) *var = argv[argi];
13144 argi++;
13145 }
13146
13147
13148 for (i = 0; i < n_opt; i++) {
13149 var = vars[vari++];
13150 if (argi < argc - n_trail) {
13151 if (var) *var = argv[argi];
13152 argi++;
13153 }
13154 else {
13155 if (var) *var = ((VALUE)RUBY_Qnil);
13156 }
13157 }
13158
13159
13160 if (f_var) {
13161 int n_var = argc - argi - n_trail;
13162
13163 var = vars[vari++];
13164 if (0 < n_var) {
13165 if (var) *var = rb_ary_new_from_values(n_var, &argv[argi]);
13166 argi += n_var;
13167 }
13168 else {
13169 if (var) *var = rb_ary_new();
13170 }
13171 }
13172
13173
13174 for (i = 0; i < n_trail; i++) {
13175 var = vars[vari++];
13176 if (var) *var = argv[argi];
13177 argi++;
13178 }
13179
13180
13181 if (f_hash) {
13182 var = vars[vari++];
13183 if (var) *var = hash;
13184 }
13185
13186
13187 if (f_block) {
13188 var = vars[vari++];
13189 if (rb_block_given_p()) {
13190 *var = rb_block_proc();
13191 }
13192 else {
13193 *var = ((VALUE)RUBY_Qnil);
13194 }
13195 }
13196
13197 if (argi == argc) {
13198 return argc;
13199 }
13200
13201 argc_error:
13202 rb_error_arity(argc, n_mand, f_var ? (-1) : n_mand + n_opt);
13203 __builtin_unreachable();
13204}
13205
13206
13207
13208
13209
13210
13211
13212
13213
13214
13215
13216
13217
13218ID rb_sym2id(VALUE);
13219VALUE rb_id2sym(ID);
13220ID rb_intern(const char*);
13221ID rb_intern2(const char*, long);
13222ID rb_intern_str(VALUE str);
13223const char *rb_id2name(ID);
13224ID rb_check_id(volatile VALUE *);
13225ID rb_to_id(VALUE);
13226VALUE rb_id2str(ID);
13227VALUE rb_sym2str(VALUE);
13228VALUE rb_to_symbol(VALUE name);
13229VALUE rb_check_symbol(volatile VALUE *namep);
13230
13231__attribute__((__pure__))
13232__attribute__((__nonnull__ ()))
13233static inline ID
13234rb_intern_const(const char *str)
13235{
13236 size_t len = strlen(str);
13237 return rb_intern2(str, ((long)len));
13238}
13239
13240__declspec(noalias)
13241__attribute__((__nonnull__ ()))
13242static inline ID
13243rbimpl_intern_const(ID *ptr, const char *str)
13244{
13245 while (! *ptr) {
13246 *ptr = rb_intern_const(str);
13247 }
13248
13249 return *ptr;
13250}
13251
13252
13253
13254
13255
13256
13257
13258
13259
13260
13261
13262typedef VALUE rb_gvar_getter_t(ID id, VALUE *data);
13263typedef void rb_gvar_setter_t(VALUE val, ID id, VALUE *data);
13264typedef void rb_gvar_marker_t(VALUE *var);
13265
13269
13273
13277
13278__declspec(noreturn)
13280
13281void rb_define_variable(const char*,VALUE*);
13284void rb_define_readonly_variable(const char*,const VALUE*);
13285void rb_define_const(VALUE,const char*,VALUE);
13286void rb_define_global_const(const char*,VALUE);
13287
13288VALUE rb_gv_set(const char*, VALUE);
13289VALUE rb_gv_get(const char*);
13290VALUE rb_iv_get(VALUE, const char*);
13291VALUE rb_iv_set(VALUE, const char*, VALUE);
13292
13293
13294
13295
13296
13297
13298
13299
13300
13301
13302
13303
13304
13305
13306
13307
13308
13309
13310
13311
13312
13313
13314VALUE rb_get_path(VALUE);
13315
13316VALUE rb_get_path_no_checksafe(VALUE);
13317
13318
13319
13320
13321
13322
13323
13324
13325
13326
13327
13328
13329
13330const char *rb_class2name(VALUE);
13331const char *rb_obj_classname(VALUE);
13332
13333void rb_p(VALUE);
13334
13335VALUE rb_equal(VALUE,VALUE);
13336
13337VALUE rb_require(const char*);
13338
13339
13340
13341
13342
13343
13344
13345
13346
13347
13348
13349
13350VALUE rb_big_new(size_t, int);
13351int rb_bigzero_p(VALUE x);
13352VALUE rb_big_clone(VALUE);
13353void rb_big_2comp(VALUE);
13354VALUE rb_big_norm(VALUE);
13355void rb_big_resize(VALUE big, size_t len);
13356VALUE rb_cstr_to_inum(const char*, int, int);
13357VALUE rb_str_to_inum(VALUE, int, int);
13358VALUE rb_cstr2inum(const char*, int);
13359VALUE rb_str2inum(VALUE, int);
13360VALUE rb_big2str(VALUE, int);
13361long rb_big2long(VALUE);
13362unsigned long rb_big2ulong(VALUE);
13363
13364 long long
13365 rb_big2ll(VALUE);
13366unsigned
13367 long long
13368 rb_big2ull(VALUE);
13369
13370void rb_big_pack(VALUE val, unsigned long *buf, long num_longs);
13371VALUE rb_big_unpack(unsigned long *buf, long num_longs);
13372int rb_uv_to_utf8(char[6],unsigned long);
13373VALUE rb_dbl2big(double);
13374double rb_big2dbl(VALUE);
13375VALUE rb_big_cmp(VALUE, VALUE);
13376VALUE rb_big_eq(VALUE, VALUE);
13377VALUE rb_big_eql(VALUE, VALUE);
13378VALUE rb_big_plus(VALUE, VALUE);
13379VALUE rb_big_minus(VALUE, VALUE);
13380VALUE rb_big_mul(VALUE, VALUE);
13381VALUE rb_big_div(VALUE, VALUE);
13382VALUE rb_big_idiv(VALUE, VALUE);
13383VALUE rb_big_modulo(VALUE, VALUE);
13384VALUE rb_big_divmod(VALUE, VALUE);
13385VALUE rb_big_pow(VALUE, VALUE);
13386VALUE rb_big_and(VALUE, VALUE);
13387VALUE rb_big_or(VALUE, VALUE);
13388VALUE rb_big_xor(VALUE, VALUE);
13389VALUE rb_big_lshift(VALUE, VALUE);
13390VALUE rb_big_rshift(VALUE, VALUE);
13391
13392
13393
13394
13395
13396
13397
13398
13399
13400
13401int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
13402VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags);
13403size_t rb_absint_size(VALUE val, int *nlz_bits_ret);
13404size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret);
13405int rb_absint_singlebit_p(VALUE val);
13406
13407
13408
13409
13410
13411int rb_cmpint(VALUE, VALUE, VALUE);
13412__declspec(noreturn) void rb_cmperr(VALUE, VALUE);
13413
13414
13415
13416
13417VALUE rb_complex_raw(VALUE, VALUE);
13418VALUE rb_complex_new(VALUE, VALUE);
13419VALUE rb_complex_new_polar(VALUE abs, VALUE arg);
13420__attribute__((__deprecated__ ("by: " "rb_complex_new_polar"))) VALUE rb_complex_polar(VALUE abs, VALUE arg);
13421VALUE rb_complex_real(VALUE z);
13422VALUE rb_complex_imag(VALUE z);
13423VALUE rb_complex_plus(VALUE x, VALUE y);
13424VALUE rb_complex_minus(VALUE x, VALUE y);
13425VALUE rb_complex_mul(VALUE x, VALUE y);
13426VALUE rb_complex_div(VALUE x, VALUE y);
13427VALUE rb_complex_uminus(VALUE z);
13428VALUE rb_complex_conjugate(VALUE z);
13429VALUE rb_complex_abs(VALUE z);
13430VALUE rb_complex_arg(VALUE z);
13431VALUE rb_complex_pow(VALUE base, VALUE exp);
13432VALUE rb_dbl_complex_new(double real, double imag);
13433
13434VALUE rb_Complex(VALUE, VALUE);
13435
13436
13437
13438
13439VALUE rb_fiber_new(rb_block_call_func_t, VALUE);
13440VALUE rb_fiber_new_kw(rb_block_call_func_t, VALUE, int kw_splat);
13441VALUE rb_fiber_resume(VALUE fib, int argc, const VALUE *argv);
13442VALUE rb_fiber_resume_kw(VALUE fib, int argc, const VALUE *argv, int kw_splat);
13443VALUE rb_fiber_yield(int argc, const VALUE *argv);
13444VALUE rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat);
13445VALUE rb_fiber_current(void);
13446VALUE rb_fiber_alive_p(VALUE);
13447
13448
13449
13450
13451VALUE rb_dir_getwd(void);
13452
13453
13454
13455
13456VALUE rb_enum_values_pack(int, const VALUE*);
13457
13458
13459
13460
13461
13462__declspec(noreturn)
13463void rb_exc_raise(VALUE);
13464
13465__declspec(noreturn)
13466void rb_exc_fatal(VALUE);
13467
13468__declspec(noreturn)
13469VALUE rb_f_exit(int, const VALUE*);
13470
13471__declspec(noreturn)
13472VALUE rb_f_abort(int, const VALUE*);
13473
13474__declspec(noreturn)
13475void rb_interrupt(void);
13476ID rb_frame_this_func(void);
13477
13478__declspec(noreturn)
13479void rb_jump_tag(int);
13480void rb_obj_call_init(VALUE, int, const VALUE*);
13481void rb_obj_call_init_kw(VALUE, int, const VALUE*, int);
13482VALUE rb_protect(VALUE (*)(VALUE), VALUE, int*);
13483ID rb_frame_callee(void);
13484VALUE rb_make_exception(int, const VALUE*);
13485
13486
13487void rb_set_end_proc(void (*)(VALUE), VALUE);
13488
13489
13490
13491
13492
13493
13494typedef VALUE rb_enumerator_size_func(VALUE, VALUE, VALUE);
13495
13496typedef struct {
13497 VALUE begin;
13498 VALUE end;
13499 VALUE step;
13500 int exclude_end;
13502
13503
13504VALUE rb_enumeratorize(VALUE, VALUE, int, const VALUE *);
13505VALUE rb_enumeratorize_with_size(VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *);
13506VALUE rb_enumeratorize_with_size_kw(VALUE, VALUE, int, const VALUE *, rb_enumerator_size_func *, int);
13508
13509
13510
13511
13512
13513
13514
13515
13516
13517
13518
13519
13520
13521
13522
13523
13524
13525
13526
13527
13528
13529
13530VALUE rb_file_s_expand_path(int, const VALUE *);
13531VALUE rb_file_expand_path(VALUE, VALUE);
13532VALUE rb_file_s_absolute_path(int, const VALUE *);
13533VALUE rb_file_absolute_path(VALUE, VALUE);
13534VALUE rb_file_dirname(VALUE fname);
13535int rb_find_file_ext_safe(VALUE*, const char* const*, int);
13536VALUE rb_find_file_safe(VALUE, int);
13537int rb_find_file_ext(VALUE*, const char* const*);
13538VALUE rb_find_file(VALUE);
13539VALUE rb_file_directory_p(VALUE,VALUE);
13540VALUE rb_str_encode_ospath(VALUE);
13541int rb_is_absolute_path(const char *);
13542
13543
13544
13545
13546__attribute__((__cold__)) __declspec(noreturn) void rb_memerror(void);
13547__attribute__((__pure__)) int rb_during_gc(void);
13548void rb_gc_mark_locations(const VALUE*, const VALUE*);
13549void rb_mark_tbl(struct st_table*);
13550void rb_mark_tbl_no_pin(struct st_table*);
13551void rb_mark_set(struct st_table*);
13552void rb_mark_hash(struct st_table*);
13554void rb_gc_mark_maybe(VALUE);
13555void rb_gc_mark(VALUE);
13556void rb_gc_mark_movable(VALUE);
13557VALUE rb_gc_location(VALUE);
13558void rb_gc_force_recycle(VALUE);
13559void rb_gc(void);
13560void rb_gc_copy_finalizer(VALUE,VALUE);
13561VALUE rb_gc_enable(void);
13562VALUE rb_gc_disable(void);
13563VALUE rb_gc_start(void);
13564VALUE rb_define_finalizer(VALUE, VALUE);
13565VALUE rb_undefine_finalizer(VALUE);
13566size_t rb_gc_count(void);
13567size_t rb_gc_stat(VALUE);
13568VALUE rb_gc_latest_gc_info(VALUE);
13569void rb_gc_adjust_memory_usage(ssize_t);
13570
13571
13572
13573
13574
13575extern VALUE rb_fs;
13576extern VALUE rb_output_fs;
13577extern VALUE rb_rs;
13578extern VALUE rb_default_rs;
13579extern VALUE rb_output_rs;
13580VALUE rb_io_write(VALUE, VALUE);
13581VALUE rb_io_gets(VALUE);
13582VALUE rb_io_getbyte(VALUE);
13583VALUE rb_io_ungetc(VALUE, VALUE);
13584VALUE rb_io_ungetbyte(VALUE, VALUE);
13585VALUE rb_io_close(VALUE);
13586VALUE rb_io_flush(VALUE);
13587VALUE rb_io_eof(VALUE);
13588VALUE rb_io_binmode(VALUE);
13589VALUE rb_io_ascii8bit_binmode(VALUE);
13590VALUE rb_io_addstr(VALUE, VALUE);
13591VALUE rb_io_printf(int, const VALUE*, VALUE);
13592VALUE rb_io_print(int, const VALUE*, VALUE);
13593VALUE rb_io_puts(int, const VALUE*, VALUE);
13594VALUE rb_io_fdopen(int, int, const char*);
13595VALUE rb_io_get_io(VALUE);
13596VALUE rb_file_open(const char*, const char*);
13597VALUE rb_file_open_str(VALUE, const char*);
13598VALUE rb_gets(void);
13599void rb_write_error(const char*);
13600void rb_write_error2(const char*, long);
13601void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds);
13602int rb_pipe(int *pipes);
13603int rb_reserved_fd_p(int fd);
13604int rb_cloexec_open(const char *pathname, int flags, mode_t mode);
13605int rb_cloexec_dup(int oldfd);
13606int rb_cloexec_dup2(int oldfd, int newfd);
13607int rb_cloexec_pipe(int fildes[2]);
13608int rb_cloexec_fcntl_dupfd(int fd, int minfd);
13609void rb_update_max_fd(int fd);
13610void rb_fd_fix_cloexec(int fd);
13611
13612
13613
13614
13615void rb_load(VALUE, int);
13616void rb_load_protect(VALUE, int, int*);
13617int rb_provided(const char*);
13618int rb_feature_provided(const char *, const char **);
13619void rb_provide(const char*);
13620VALUE rb_f_require(VALUE, VALUE);
13621VALUE rb_require_string(VALUE);
13622
13623
13624
13625
13626VALUE rb_marshal_dump(VALUE, VALUE);
13627VALUE rb_marshal_load(VALUE);
13628void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE (*dumper)(VALUE), VALUE (*loader)(VALUE, VALUE));
13629
13630
13631
13632
13633__declspec(noreturn) void rb_num_zerodiv(void);
13634VALUE rb_num_coerce_bin(VALUE, VALUE, ID);
13635VALUE rb_num_coerce_cmp(VALUE, VALUE, ID);
13636VALUE rb_num_coerce_relop(VALUE, VALUE, ID);
13637VALUE rb_num_coerce_bit(VALUE, VALUE, ID);
13638VALUE rb_num2fix(VALUE);
13639VALUE rb_fix2str(VALUE, int);
13640__attribute__((__const__)) VALUE rb_dbl_cmp(double, double);
13641
13642
13643
13644
13645
13646VALUE rb_class_new_instance_pass_kw(int, const VALUE *, VALUE);
13647VALUE rb_class_new_instance(int, const VALUE*, VALUE);
13648VALUE rb_class_new_instance_kw(int, const VALUE*, VALUE, int);
13649
13650
13651int rb_eql(VALUE, VALUE);
13652VALUE rb_any_to_s(VALUE);
13653VALUE rb_inspect(VALUE);
13654VALUE rb_obj_is_instance_of(VALUE, VALUE);
13655VALUE rb_obj_is_kind_of(VALUE, VALUE);
13656VALUE rb_obj_alloc(VALUE);
13657VALUE rb_obj_clone(VALUE);
13658VALUE rb_obj_dup(VALUE);
13659VALUE rb_obj_init_copy(VALUE,VALUE);
13660VALUE rb_obj_taint(VALUE);
13661
13662__attribute__((__pure__))
13663VALUE rb_obj_tainted(VALUE);
13664VALUE rb_obj_untaint(VALUE);
13665VALUE rb_obj_untrust(VALUE);
13666
13667__attribute__((__pure__))
13668VALUE rb_obj_untrusted(VALUE);
13669VALUE rb_obj_trust(VALUE);
13670VALUE rb_obj_freeze(VALUE);
13671
13672__attribute__((__pure__))
13673VALUE rb_obj_frozen_p(VALUE);
13674
13675VALUE rb_obj_id(VALUE);
13676VALUE rb_memory_id(VALUE);
13677VALUE rb_obj_class(VALUE);
13678
13679__attribute__((__pure__))
13680VALUE rb_class_real(VALUE);
13681
13682__attribute__((__pure__))
13683VALUE rb_class_inherited_p(VALUE, VALUE);
13684VALUE rb_class_superclass(VALUE);
13685VALUE rb_class_get_superclass(VALUE);
13686VALUE rb_convert_type(VALUE,int,const char*,const char*);
13687VALUE rb_check_convert_type(VALUE,int,const char*,const char*);
13688VALUE rb_check_to_integer(VALUE, const char *);
13689VALUE rb_check_to_float(VALUE);
13690VALUE rb_to_int(VALUE);
13691VALUE rb_check_to_int(VALUE);
13692VALUE rb_Integer(VALUE);
13693VALUE rb_to_float(VALUE);
13694VALUE rb_Float(VALUE);
13695VALUE rb_String(VALUE);
13696VALUE rb_Array(VALUE);
13697VALUE rb_Hash(VALUE);
13698double rb_cstr_to_dbl(const char*, int);
13699double rb_str_to_dbl(VALUE, int);
13700
13701
13702
13703
13704ID rb_id_attrset(ID);
13705
13706__attribute__((__const__))
13707int rb_is_const_id(ID);
13708
13709__attribute__((__const__))
13710int rb_is_global_id(ID);
13711
13712__attribute__((__const__))
13713int rb_is_instance_id(ID);
13714
13715__attribute__((__const__))
13716int rb_is_attrset_id(ID);
13717
13718__attribute__((__const__))
13719int rb_is_class_id(ID);
13720
13721__attribute__((__const__))
13722int rb_is_local_id(ID);
13723
13724__attribute__((__const__))
13725int rb_is_junk_id(ID);
13726int rb_symname_p(const char*);
13727int rb_sym_interned_p(VALUE);
13728VALUE rb_backref_get(void);
13729void rb_backref_set(VALUE);
13730VALUE rb_lastline_get(void);
13731void rb_lastline_set(VALUE);
13732
13733
13734VALUE rb_sym_all_symbols(void);
13735
13736
13737
13738
13739
13740void rb_last_status_set(int status, pid_t pid);
13741VALUE rb_last_status_get(void);
13742int rb_proc_exec(const char*);
13743
13744__declspec(noreturn)
13745VALUE rb_f_exec(int, const VALUE*);
13746pid_t rb_waitpid(pid_t pid, int *status, int flags);
13747void rb_syswait(pid_t pid);
13748pid_t rb_spawn(int, const VALUE*);
13749pid_t rb_spawn_err(int, const VALUE*, char*, size_t);
13750VALUE rb_proc_times(VALUE);
13751VALUE rb_detach_process(pid_t pid);
13752
13753
13754
13755
13756unsigned int rb_genrand_int32(void);
13757double rb_genrand_real(void);
13758void rb_reset_random_seed(void);
13759VALUE rb_random_bytes(VALUE rnd, long n);
13760VALUE rb_random_int(VALUE rnd, VALUE max);
13761unsigned int rb_random_int32(VALUE rnd);
13762double rb_random_real(VALUE rnd);
13763unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit);
13764unsigned long rb_genrand_ulong_limited(unsigned long i);
13765
13766
13767
13768
13769VALUE rb_range_new(VALUE, VALUE, int);
13770VALUE rb_range_beg_len(VALUE, long*, long*, long, int);
13771int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp);
13772
13773
13774
13775
13776VALUE rb_rational_raw(VALUE, VALUE);
13777VALUE rb_rational_new(VALUE, VALUE);
13778VALUE rb_Rational(VALUE, VALUE);
13779VALUE rb_rational_num(VALUE rat);
13780VALUE rb_rational_den(VALUE rat);
13781VALUE rb_flt_rationalize_with_prec(VALUE, VALUE);
13782VALUE rb_flt_rationalize(VALUE);
13783
13784
13785
13786
13787int rb_memcicmp(const void*,const void*,long);
13788void rb_match_busy(VALUE);
13789VALUE rb_reg_nth_defined(int, VALUE);
13790VALUE rb_reg_nth_match(int, VALUE);
13791int rb_reg_backref_number(VALUE match, VALUE backref);
13792VALUE rb_reg_last_match(VALUE);
13793VALUE rb_reg_match_pre(VALUE);
13794VALUE rb_reg_match_post(VALUE);
13795VALUE rb_reg_match_last(VALUE);
13796VALUE rb_reg_new_str(VALUE, int);
13797VALUE rb_reg_new(const char *, long, int);
13798VALUE rb_reg_alloc(void);
13799VALUE rb_reg_init_str(VALUE re, VALUE s, int options);
13800VALUE rb_reg_match(VALUE, VALUE);
13801VALUE rb_reg_match2(VALUE);
13802int rb_reg_options(VALUE);
13803
13804
13805
13806
13807extern VALUE rb_argv0;
13808VALUE rb_get_argv(void);
13809void *rb_load_file(const char*);
13810void *rb_load_file_str(VALUE);
13811
13812
13813
13814
13815
13816struct timeval;
13817
13818typedef struct {
13819 int maxfd;
13820 fd_set *fdset;
13821} rb_fdset_t;
13822
13823void rb_fd_init(rb_fdset_t *);
13824void rb_fd_term(rb_fdset_t *);
13825void rb_fd_zero(rb_fdset_t *);
13826void rb_fd_set(int, rb_fdset_t *);
13827void rb_fd_clr(int, rb_fdset_t *);
13828int rb_fd_isset(int, const rb_fdset_t *);
13829void rb_fd_copy(rb_fdset_t *, const fd_set *, int);
13830void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src);
13831int rb_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
13832
13833__attribute__((__nonnull__ ()))
13834__attribute__((__pure__))
13835
13836static inline fd_set *
13837rb_fd_ptr(const rb_fdset_t *f)
13838{
13839 return f->fdset;
13840}
13841
13842__attribute__((__nonnull__ ()))
13843__attribute__((__pure__))
13844static inline int
13845rb_fd_max(const rb_fdset_t *f)
13846{
13847 return f->maxfd;
13848}
13849
13850
13851
13852
13853
13854
13855
13856
13857
13858struct timeval;
13859
13860int rb_thread_fd_select(int, rb_fdset_t *, rb_fdset_t *, rb_fdset_t *, struct timeval *);
13861
13862
13863
13864
13865VALUE rb_f_kill(int, const VALUE*);
13866
13867void (*ruby_posix_signal(int, void (*)(int)))(int);
13868
13869const char *ruby_signal_name(int);
13870void ruby_default_signal(int);
13871
13872
13873
13874
13875VALUE rb_f_sprintf(int, const VALUE*);
13876
13877__attribute__((__format__(__printf__, 1, 2)))
13878VALUE rb_sprintf(const char*, ...);
13879VALUE rb_vsprintf(const char*, va_list);
13880
13881__attribute__((__format__(__printf__, 2, 3)))
13882VALUE rb_str_catf(VALUE, const char*, ...);
13883VALUE rb_str_vcatf(VALUE, const char*, va_list);
13884VALUE rb_str_format(int, const VALUE *, VALUE);
13885
13886
13887
13888
13889VALUE rb_str_new(const char*, long);
13890VALUE rb_str_new_cstr(const char*);
13891VALUE rb_str_new_shared(VALUE);
13892VALUE rb_str_new_frozen(VALUE);
13893VALUE rb_str_new_with_class(VALUE, const char*, long);
13894VALUE rb_tainted_str_new_cstr(const char*);
13895VALUE rb_tainted_str_new(const char*, long);
13896VALUE rb_external_str_new(const char*, long);
13897VALUE rb_external_str_new_cstr(const char*);
13898VALUE rb_locale_str_new(const char*, long);
13899VALUE rb_locale_str_new_cstr(const char*);
13900VALUE rb_filesystem_str_new(const char*, long);
13901VALUE rb_filesystem_str_new_cstr(const char*);
13902VALUE rb_str_buf_new(long);
13903VALUE rb_str_buf_new_cstr(const char*);
13904VALUE rb_str_buf_new2(const char*);
13905VALUE rb_str_tmp_new(long);
13906VALUE rb_usascii_str_new(const char*, long);
13907VALUE rb_usascii_str_new_cstr(const char*);
13908VALUE rb_utf8_str_new(const char*, long);
13909VALUE rb_utf8_str_new_cstr(const char*);
13910VALUE rb_str_new_static(const char *, long);
13911VALUE rb_usascii_str_new_static(const char *, long);
13912VALUE rb_utf8_str_new_static(const char *, long);
13913void rb_str_free(VALUE);
13914void rb_str_shared_replace(VALUE, VALUE);
13915VALUE rb_str_buf_append(VALUE, VALUE);
13916VALUE rb_str_buf_cat(VALUE, const char*, long);
13917VALUE rb_str_buf_cat2(VALUE, const char*);
13918VALUE rb_str_buf_cat_ascii(VALUE, const char*);
13919VALUE rb_obj_as_string(VALUE);
13920VALUE rb_check_string_type(VALUE);
13921void rb_must_asciicompat(VALUE);
13922VALUE rb_str_dup(VALUE);
13923VALUE rb_str_resurrect(VALUE str);
13924VALUE rb_str_locktmp(VALUE);
13925VALUE rb_str_unlocktmp(VALUE);
13926VALUE rb_str_dup_frozen(VALUE);
13927VALUE rb_str_plus(VALUE, VALUE);
13928VALUE rb_str_times(VALUE, VALUE);
13929long rb_str_sublen(VALUE, long);
13930VALUE rb_str_substr(VALUE, long, long);
13931VALUE rb_str_subseq(VALUE, long, long);
13932char *rb_str_subpos(VALUE, long, long*);
13933void rb_str_modify(VALUE);
13934void rb_str_modify_expand(VALUE, long);
13935VALUE rb_str_freeze(VALUE);
13936void rb_str_set_len(VALUE, long);
13937VALUE rb_str_resize(VALUE, long);
13938VALUE rb_str_cat(VALUE, const char*, long);
13939VALUE rb_str_cat_cstr(VALUE, const char*);
13940VALUE rb_str_cat2(VALUE, const char*);
13941VALUE rb_str_append(VALUE, VALUE);
13942VALUE rb_str_concat(VALUE, VALUE);
13943st_index_t rb_memhash(const void *ptr, long len);
13944st_index_t rb_hash_start(st_index_t);
13945st_index_t rb_hash_uint32(st_index_t, uint32_t);
13946st_index_t rb_hash_uint(st_index_t, st_index_t);
13947st_index_t rb_hash_end(st_index_t);
13948st_index_t rb_str_hash(VALUE);
13949int rb_str_hash_cmp(VALUE,VALUE);
13950int rb_str_comparable(VALUE, VALUE);
13951int rb_str_cmp(VALUE, VALUE);
13952VALUE rb_str_equal(VALUE str1, VALUE str2);
13953VALUE rb_str_drop_bytes(VALUE, long);
13954void rb_str_update(VALUE, long, long, VALUE);
13955VALUE rb_str_replace(VALUE, VALUE);
13956VALUE rb_str_inspect(VALUE);
13957VALUE rb_str_dump(VALUE);
13958VALUE rb_str_split(VALUE, const char*);
13960VALUE rb_str_intern(VALUE);
13961VALUE rb_sym_to_s(VALUE);
13962long rb_str_strlen(VALUE);
13963VALUE rb_str_length(VALUE);
13964long rb_str_offset(VALUE, long);
13965__attribute__((__pure__))
13966size_t rb_str_capacity(VALUE);
13967VALUE rb_str_ellipsize(VALUE, long);
13968VALUE rb_str_scrub(VALUE, VALUE);
13969VALUE rb_str_succ(VALUE);
13970
13971__attribute__((__nonnull__ ()))
13972static inline long
13973rbimpl_strlen(const char *str)
13974{
13975 return ((long)strlen(str));
13976}
13977
13978static inline VALUE
13979rbimpl_str_new_cstr(const char *str)
13980{
13981 long len = rbimpl_strlen(str);
13982 return rb_str_new_static(str, len);
13983}
13984
13985static inline VALUE
13986rbimpl_tainted_str_new_cstr(const char *str)
13987{
13988 long len = rbimpl_strlen(str);
13989 return rb_tainted_str_new(str, len);
13990}
13991
13992static inline VALUE
13993rbimpl_usascii_str_new_cstr(const char *str)
13994{
13995 long len = rbimpl_strlen(str);
13996 return rb_usascii_str_new_static(str, len);
13997}
13998
13999static inline VALUE
14000rbimpl_utf8_str_new_cstr(const char *str)
14001{
14002 long len = rbimpl_strlen(str);
14003 return rb_utf8_str_new_static(str, len);
14004}
14005
14006static inline VALUE
14007rbimpl_external_str_new_cstr(const char *str)
14008{
14009 long len = rbimpl_strlen(str);
14010 return rb_external_str_new(str, len);
14011}
14012
14013static inline VALUE
14014rbimpl_locale_str_new_cstr(const char *str)
14015{
14016 long len = rbimpl_strlen(str);
14017 return rb_locale_str_new(str, len);
14018}
14019
14020static inline VALUE
14021rbimpl_str_buf_new_cstr(const char *str)
14022{
14023 long len = rbimpl_strlen(str);
14024 VALUE buf = rb_str_buf_new(len);
14025 return rb_str_buf_cat(buf, str, len);
14026}
14027
14028static inline VALUE
14029rbimpl_str_cat_cstr(VALUE buf, const char *str)
14030{
14031 long len = rbimpl_strlen(str);
14032 return rb_str_cat(buf, str, len);
14033}
14034
14035static inline VALUE
14036rbimpl_exc_new_cstr(VALUE exc, const char *str)
14037{
14038 long len = rbimpl_strlen(str);
14039 return rb_exc_new(exc, str, len);
14040}
14041
14042
14043
14044
14045
14046
14047
14048
14049
14050
14051
14052
14053
14054
14055
14056
14057
14058
14059
14060
14061
14062
14063
14064
14065
14066
14067
14068
14069
14070
14071
14072
14073
14074
14075
14076
14077
14078
14079
14080
14081
14082
14083
14084
14085
14086
14087
14088
14089
14090
14091
14092
14093
14094
14095
14096
14097VALUE rb_struct_new(VALUE, ...);
14098VALUE rb_struct_define(const char*, ...);
14099VALUE rb_struct_define_under(VALUE, const char*, ...);
14100VALUE rb_struct_alloc(VALUE, VALUE);
14101VALUE rb_struct_initialize(VALUE, VALUE);
14102VALUE rb_struct_aref(VALUE, VALUE);
14103VALUE rb_struct_aset(VALUE, VALUE, VALUE);
14104VALUE rb_struct_getmember(VALUE, ID);
14105VALUE rb_struct_s_members(VALUE);
14106VALUE rb_struct_members(VALUE);
14107VALUE rb_struct_size(VALUE s);
14108VALUE rb_struct_alloc_noinit(VALUE);
14109VALUE rb_struct_define_without_accessor(const char *, VALUE, rb_alloc_func_t, ...);
14110VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc, ...);
14111
14112
14113
14114struct timeval;
14115
14116
14117void rb_thread_schedule(void);
14118void rb_thread_wait_fd(int);
14119int rb_thread_fd_writable(int);
14120void rb_thread_fd_close(int);
14121int rb_thread_alone(void);
14122void rb_thread_sleep(int);
14123void rb_thread_sleep_forever(void);
14124void rb_thread_sleep_deadly(void);
14125VALUE rb_thread_stop(void);
14126VALUE rb_thread_wakeup(VALUE);
14127VALUE rb_thread_wakeup_alive(VALUE);
14128VALUE rb_thread_run(VALUE);
14129VALUE rb_thread_kill(VALUE);
14130VALUE rb_thread_create(VALUE (*)(void *), void*);
14131void rb_thread_wait_for(struct timeval);
14132VALUE rb_thread_current(void);
14133VALUE rb_thread_main(void);
14134VALUE rb_thread_local_aref(VALUE, ID);
14135VALUE rb_thread_local_aset(VALUE, ID, VALUE);
14136void rb_thread_atfork(void);
14138VALUE rb_exec_recursive(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
14139VALUE rb_exec_recursive_paired(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE);
14140VALUE rb_exec_recursive_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE);
14141VALUE rb_exec_recursive_paired_outer(VALUE(*)(VALUE, VALUE, int),VALUE,VALUE,VALUE);
14142
14143typedef void rb_unblock_function_t(void *);
14144typedef VALUE rb_blocking_function_t(void *);
14145void rb_thread_check_ints(void);
14146int rb_thread_interrupted(VALUE thval);
14147
14148VALUE rb_mutex_new(void);
14149VALUE rb_mutex_locked_p(VALUE mutex);
14150VALUE rb_mutex_trylock(VALUE mutex);
14151VALUE rb_mutex_lock(VALUE mutex);
14152VALUE rb_mutex_unlock(VALUE mutex);
14153VALUE rb_mutex_sleep(VALUE self, VALUE timeout);
14154VALUE rb_mutex_synchronize(VALUE mutex, VALUE (*func)(VALUE arg), VALUE arg);
14155
14156
14157
14158struct timespec;
14159struct timeval;
14160
14161
14162void rb_timespec_now(struct timespec *);
14163VALUE rb_time_new(time_t, long);
14164VALUE rb_time_nano_new(time_t, long);
14165VALUE rb_time_timespec_new(const struct timespec *, int);
14166VALUE rb_time_num_new(VALUE, VALUE);
14167struct timeval rb_time_interval(VALUE num);
14168struct timeval rb_time_timeval(VALUE time);
14169struct timespec rb_time_timespec(VALUE time);
14170struct timespec rb_time_timespec_interval(VALUE num);
14171VALUE rb_time_utc_offset(VALUE time);
14172VALUE rb_time_succ(VALUE);
14173
14174
14175
14176
14177VALUE rb_mod_name(VALUE);
14178VALUE rb_class_path(VALUE);
14179VALUE rb_class_path_cached(VALUE);
14180void rb_set_class_path(VALUE, VALUE, const char*);
14181void rb_set_class_path_string(VALUE, VALUE, VALUE);
14182VALUE rb_path_to_class(VALUE);
14183VALUE rb_path2class(const char*);
14184VALUE rb_class_name(VALUE);
14185VALUE rb_autoload_load(VALUE, ID);
14186VALUE rb_autoload_p(VALUE, ID);
14187VALUE rb_f_trace_var(int, const VALUE*);
14188VALUE rb_f_untrace_var(int, const VALUE*);
14189VALUE rb_f_global_variables(void);
14190void rb_alias_variable(ID, ID);
14191void rb_copy_generic_ivar(VALUE,VALUE);
14192void rb_free_generic_ivar(VALUE);
14193VALUE rb_ivar_get(VALUE, ID);
14194VALUE rb_ivar_set(VALUE, ID, VALUE);
14195VALUE rb_ivar_defined(VALUE, ID);
14196void rb_ivar_foreach(VALUE, int (*)(ID, VALUE, st_data_t), st_data_t);
14197st_index_t rb_ivar_count(VALUE);
14198VALUE rb_attr_get(VALUE, ID);
14199VALUE rb_obj_instance_variables(VALUE);
14200VALUE rb_obj_remove_instance_variable(VALUE, VALUE);
14201void *rb_mod_const_at(VALUE, void*);
14202void *rb_mod_const_of(VALUE, void*);
14203VALUE rb_const_list(void*);
14204VALUE rb_mod_constants(int, const VALUE *, VALUE);
14205VALUE rb_mod_remove_const(VALUE, VALUE);
14206int rb_const_defined(VALUE, ID);
14207int rb_const_defined_at(VALUE, ID);
14208int rb_const_defined_from(VALUE, ID);
14209VALUE rb_const_get(VALUE, ID);
14210VALUE rb_const_get_at(VALUE, ID);
14211VALUE rb_const_get_from(VALUE, ID);
14212void rb_const_set(VALUE, ID, VALUE);
14213VALUE rb_const_remove(VALUE, ID);
14214
14215
14216
14217
14218VALUE rb_cvar_defined(VALUE, ID);
14219void rb_cvar_set(VALUE, ID, VALUE);
14220VALUE rb_cvar_get(VALUE, ID);
14221void rb_cv_set(VALUE, const char*, VALUE);
14222VALUE rb_cv_get(VALUE, const char*);
14223void rb_define_class_variable(VALUE, const char*, VALUE);
14224VALUE rb_mod_class_variables(int, const VALUE*, VALUE);
14225VALUE rb_mod_remove_cvar(VALUE, VALUE);
14226
14227
14228
14229
14230
14231
14232
14233int ruby_native_thread_p(void);
14234
14235
14236__attribute__((__format__(__printf__, (3), (4)))) int ruby_snprintf(char *str, size_t n, char const *fmt, ...);
14237int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap);
14238
14239
14240
14241
14242
14243
14244
14245
14246
14247
14248
14249
14250
14251
14252
14253
14254
14255
14256
14257
14258
14259
14260
14261
14262
14263
14264
14265
14266
14267
14268
14269
14270
14271
14272
14273
14274
14275
14276
14277
14278
14279
14280
14281
14282
14283
14284
14285
14286
14287
14288
14289
14290
14291
14292
14293
14294
14295
14296
14297
14298
14299
14300typedef __sig_atomic_t sig_atomic_t;
14301
14302
14303
14304
14305
14306
14307
14308
14309
14310
14311
14312
14313
14314
14315
14316
14317
14318
14319union sigval
14320{
14321 int sival_int;
14322 void *sival_ptr;
14323};
14324
14325typedef union sigval __sigval_t;
14326
14327
14328
14329
14330
14331
14332
14333
14334
14335
14336
14337
14338
14339
14340
14341
14342
14343
14344
14345
14346
14347
14348
14349typedef struct
14350 {
14351 int si_signo;
14352
14353 int si_errno;
14354
14355 int si_code;
14356
14357
14358
14359
14360
14361 int __pad0;
14362
14363
14364 union
14365 {
14366 int _pad[((128 / sizeof (int)) - 4)];
14367
14368
14369 struct
14370 {
14371 __pid_t si_pid;
14372 __uid_t si_uid;
14373 } _kill;
14374
14375
14376 struct
14377 {
14378 int si_tid;
14379 int si_overrun;
14380 __sigval_t si_sigval;
14381 } _timer;
14382
14383
14384 struct
14385 {
14386 __pid_t si_pid;
14387 __uid_t si_uid;
14388 __sigval_t si_sigval;
14389 } _rt;
14390
14391
14392 struct
14393 {
14394 __pid_t si_pid;
14395 __uid_t si_uid;
14396 int si_status;
14397 __clock_t si_utime;
14398 __clock_t si_stime;
14399 } _sigchld;
14400
14401
14402 struct
14403 {
14404 void *si_addr;
14405
14406 short int si_addr_lsb;
14407 union
14408 {
14409
14410 struct
14411 {
14412 void *_lower;
14413 void *_upper;
14414 } _addr_bnd;
14415
14416 __uint32_t _pkey;
14417 } _bounds;
14418 } _sigfault;
14419
14420
14421 struct
14422 {
14423 long int si_band;
14424 int si_fd;
14425 } _sigpoll;
14426
14427
14428
14429 struct
14430 {
14431 void *_call_addr;
14432 int _syscall;
14433 unsigned int _arch;
14434 } _sigsys;
14435
14436 } _sifields;
14437 } siginfo_t ;
14438
14439
14440
14441
14442
14443
14444
14445
14446enum
14447{
14448 SI_ASYNCNL = -60,
14449 SI_DETHREAD = -7,
14450
14451 SI_TKILL,
14452 SI_SIGIO,
14453
14454 SI_ASYNCIO,
14455 SI_MESGQ,
14456 SI_TIMER,
14457
14458
14459
14460
14461
14462 SI_QUEUE,
14463 SI_USER,
14464 SI_KERNEL = 0x80
14465
14466};
14467
14468
14469
14470
14471enum
14472{
14473 ILL_ILLOPC = 1,
14474 ILL_ILLOPN,
14475 ILL_ILLADR,
14476 ILL_ILLTRP,
14477 ILL_PRVOPC,
14478 ILL_PRVREG,
14479 ILL_COPROC,
14480 ILL_BADSTK,
14481 ILL_BADIADDR
14482};
14483
14484
14485enum
14486{
14487 FPE_INTDIV = 1,
14488 FPE_INTOVF,
14489 FPE_FLTDIV,
14490 FPE_FLTOVF,
14491 FPE_FLTUND,
14492 FPE_FLTRES,
14493 FPE_FLTINV,
14494 FPE_FLTSUB,
14495 FPE_FLTUNK = 14,
14496 FPE_CONDTRAP
14497};
14498
14499
14500enum
14501{
14502 SEGV_MAPERR = 1,
14503 SEGV_ACCERR,
14504 SEGV_BNDERR,
14505 SEGV_PKUERR,
14506 SEGV_ACCADI,
14507 SEGV_ADIDERR,
14508 SEGV_ADIPERR
14509};
14510
14511
14512enum
14513{
14514 BUS_ADRALN = 1,
14515 BUS_ADRERR,
14516 BUS_OBJERR,
14517 BUS_MCEERR_AR,
14518 BUS_MCEERR_AO
14519};
14520
14521
14522
14523
14524enum
14525{
14526 TRAP_BRKPT = 1,
14527 TRAP_TRACE,
14528 TRAP_BRANCH,
14529 TRAP_HWBKPT,
14530 TRAP_UNK
14531};
14532
14533
14534
14535
14536enum
14537{
14538 CLD_EXITED = 1,
14539 CLD_KILLED,
14540 CLD_DUMPED,
14541 CLD_TRAPPED,
14542 CLD_STOPPED,
14543 CLD_CONTINUED
14544};
14545
14546
14547enum
14548{
14549 POLL_IN = 1,
14550 POLL_OUT,
14551 POLL_MSG,
14552 POLL_ERR,
14553 POLL_PRI,
14554 POLL_HUP
14555};
14556
14557
14558
14559
14560
14561
14562
14563
14564
14565
14566
14567
14568typedef __sigval_t sigval_t;
14569
14570
14571
14572
14573
14574
14575
14576
14577
14578
14579
14580
14581
14582
14583
14584
14585
14586
14587
14588
14589
14590typedef struct sigevent
14591 {
14592 __sigval_t sigev_value;
14593 int sigev_signo;
14594 int sigev_notify;
14595
14596 union
14597 {
14598 int _pad[((64 / sizeof (int)) - 4)];
14599
14600
14601
14602 __pid_t _tid;
14603
14604 struct
14605 {
14606 void (*_function) (__sigval_t);
14607 pthread_attr_t *_attribute;
14608 } _sigev_thread;
14609 } _sigev_un;
14610 } sigevent_t;
14611
14612
14613
14614
14615
14616
14617
14618
14619enum
14620{
14621 SIGEV_SIGNAL = 0,
14622 SIGEV_NONE,
14623 SIGEV_THREAD,
14624
14625 SIGEV_THREAD_ID = 4
14626
14627};
14628
14629
14630
14631
14632typedef void (*__sighandler_t) (int);
14633
14634
14635
14636
14637extern __sighandler_t __sysv_signal (int __sig, __sighandler_t __handler)
14638 __attribute__ ((__nothrow__ ));
14639
14640extern __sighandler_t sysv_signal (int __sig, __sighandler_t __handler)
14641 __attribute__ ((__nothrow__ ));
14642
14643
14644
14645
14646
14647
14648extern __sighandler_t signal (int __sig, __sighandler_t __handler)
14649 __attribute__ ((__nothrow__ ));
14650extern int kill (__pid_t __pid, int __sig) __attribute__ ((__nothrow__ ));
14651
14652
14653
14654
14655
14656
14657extern int killpg (__pid_t __pgrp, int __sig) __attribute__ ((__nothrow__ ));
14658
14659
14660
14661extern int raise (int __sig) __attribute__ ((__nothrow__ ));
14662
14663
14664
14665extern __sighandler_t ssignal (int __sig, __sighandler_t __handler)
14666 __attribute__ ((__nothrow__ ));
14667extern int gsignal (int __sig) __attribute__ ((__nothrow__ ));
14668
14669
14670
14671
14672extern void psignal (int __sig, const char *__s);
14673
14674
14675extern void psiginfo (const siginfo_t *__pinfo, const char *__s);
14676extern int sigpause (int __sig) __asm__ ("__xpg_sigpause");
14677
14678
14679extern int sigblock (int __mask) __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));
14680
14681
14682extern int sigsetmask (int __mask) __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));
14683
14684
14685extern int siggetmask (void) __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));
14686
14687
14688
14689
14690
14691
14692
14693typedef __sighandler_t sighandler_t;
14694
14695
14696
14697
14698typedef __sighandler_t sig_t;
14699
14700
14701
14702
14703
14704extern int sigemptyset (sigset_t *__set) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
14705
14706
14707extern int sigfillset (sigset_t *__set) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
14708
14709
14710extern int sigaddset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
14711
14712
14713extern int sigdelset (sigset_t *__set, int __signo) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
14714
14715
14716extern int sigismember (const sigset_t *__set, int __signo)
14717 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
14718
14719
14720
14721extern int sigisemptyset (const sigset_t *__set) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
14722
14723
14724extern int sigandset (sigset_t *__set, const sigset_t *__left,
14725 const sigset_t *__right) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2, 3)));
14726
14727
14728extern int sigorset (sigset_t *__set, const sigset_t *__left,
14729 const sigset_t *__right) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2, 3)));
14730
14731
14732
14733
14734
14735
14736
14737
14738
14739
14740
14741struct sigaction
14742 {
14743
14744
14745 union
14746 {
14747
14748 __sighandler_t sa_handler;
14749
14750 void (*sa_sigaction) (int, siginfo_t *, void *);
14751 }
14752 __sigaction_handler;
14753
14754
14755
14756
14757
14758 __sigset_t sa_mask;
14759
14760
14761 int sa_flags;
14762
14763
14764 void (*sa_restorer) (void);
14765 };
14766
14767
14768
14769
14770
14771
14772
14773
14774
14775
14776
14777
14778
14779
14780
14781
14782extern int sigprocmask (int __how, const sigset_t *__restrict __set,
14783 sigset_t *__restrict __oset) __attribute__ ((__nothrow__ ));
14784
14785
14786
14787
14788
14789
14790extern int sigsuspend (const sigset_t *__set) __attribute__ ((__nonnull__ (1)));
14791
14792
14793extern int sigaction (int __sig, const struct sigaction *__restrict __act,
14794 struct sigaction *__restrict __oact) __attribute__ ((__nothrow__ ));
14795
14796
14797extern int sigpending (sigset_t *__set) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
14798
14799
14800
14801
14802
14803
14804
14805extern int sigwait (const sigset_t *__restrict __set, int *__restrict __sig)
14806 __attribute__ ((__nonnull__ (1, 2)));
14807
14808
14809
14810
14811
14812
14813
14814extern int sigwaitinfo (const sigset_t *__restrict __set,
14815 siginfo_t *__restrict __info) __attribute__ ((__nonnull__ (1)));
14816
14817
14818
14819
14820
14821
14822extern int sigtimedwait (const sigset_t *__restrict __set,
14823 siginfo_t *__restrict __info,
14824 const struct timespec *__restrict __timeout)
14825 __attribute__ ((__nonnull__ (1)));
14826
14827
14828
14829extern int sigqueue (__pid_t __pid, int __sig, const union sigval __val)
14830 __attribute__ ((__nothrow__ ));
14831extern const char *const _sys_siglist[(64 + 1)];
14832extern const char *const sys_siglist[(64 + 1)];
14833
14834
14835
14836
14837
14838
14839
14840
14841
14842
14843
14844
14845struct _fpx_sw_bytes
14846{
14847 __uint32_t magic1;
14848 __uint32_t extended_size;
14849 __uint64_t xstate_bv;
14850 __uint32_t xstate_size;
14851 __uint32_t __glibc_reserved1[7];
14852};
14853
14854struct _fpreg
14855{
14856 unsigned short significand[4];
14857 unsigned short exponent;
14858};
14859
14860struct _fpxreg
14861{
14862 unsigned short significand[4];
14863 unsigned short exponent;
14864 unsigned short __glibc_reserved1[3];
14865};
14866
14867struct _xmmreg
14868{
14869 __uint32_t element[4];
14870};
14871struct _fpstate
14872{
14873
14874 __uint16_t cwd;
14875 __uint16_t swd;
14876 __uint16_t ftw;
14877 __uint16_t fop;
14878 __uint64_t rip;
14879 __uint64_t rdp;
14880 __uint32_t mxcsr;
14881 __uint32_t mxcr_mask;
14882 struct _fpxreg _st[8];
14883 struct _xmmreg _xmm[16];
14884 __uint32_t __glibc_reserved1[24];
14885};
14886
14887struct sigcontext
14888{
14889 __uint64_t r8;
14890 __uint64_t r9;
14891 __uint64_t r10;
14892 __uint64_t r11;
14893 __uint64_t r12;
14894 __uint64_t r13;
14895 __uint64_t r14;
14896 __uint64_t r15;
14897 __uint64_t rdi;
14898 __uint64_t rsi;
14899 __uint64_t rbp;
14900 __uint64_t rbx;
14901 __uint64_t rdx;
14902 __uint64_t rax;
14903 __uint64_t rcx;
14904 __uint64_t rsp;
14905 __uint64_t rip;
14906 __uint64_t eflags;
14907 unsigned short cs;
14908 unsigned short gs;
14909 unsigned short fs;
14910 unsigned short __pad0;
14911 __uint64_t err;
14912 __uint64_t trapno;
14913 __uint64_t oldmask;
14914 __uint64_t cr2;
14915 __extension__ union
14916 {
14917 struct _fpstate * fpstate;
14918 __uint64_t __fpstate_word;
14919 };
14920 __uint64_t __reserved1 [8];
14921};
14922
14923
14924
14925struct _xsave_hdr
14926{
14927 __uint64_t xstate_bv;
14928 __uint64_t __glibc_reserved1[2];
14929 __uint64_t __glibc_reserved2[5];
14930};
14931
14932struct _ymmh_state
14933{
14934 __uint32_t ymmh_space[64];
14935};
14936
14937struct _xstate
14938{
14939 struct _fpstate fpstate;
14940 struct _xsave_hdr xstate_hdr;
14941 struct _ymmh_state ymmh;
14942};
14943
14944
14945extern int sigreturn (struct sigcontext *__scp) __attribute__ ((__nothrow__ ));
14946
14947
14948
14949
14950
14951
14952
14953
14954
14955
14956
14957typedef struct
14958 {
14959 void *ss_sp;
14960 int ss_flags;
14961 size_t ss_size;
14962 } stack_t;
14963
14964
14965
14966
14967
14968
14969
14970
14971
14972__extension__ typedef long long int greg_t;
14973
14974
14975
14976
14977
14978
14979typedef greg_t gregset_t[23];
14980
14981
14982
14983enum
14984{
14985 REG_R8 = 0,
14986 REG_R9,
14987 REG_R10,
14988 REG_R11,
14989 REG_R12,
14990 REG_R13,
14991 REG_R14,
14992 REG_R15,
14993 REG_RDI,
14994 REG_RSI,
14995 REG_RBP,
14996 REG_RBX,
14997 REG_RDX,
14998 REG_RAX,
14999 REG_RCX,
15000 REG_RSP,
15001 REG_RIP,
15002 REG_EFL,
15003 REG_CSGSFS,
15004 REG_ERR,
15005 REG_TRAPNO,
15006 REG_OLDMASK,
15007 REG_CR2
15008};
15009
15010
15011struct _libc_fpxreg
15012{
15013 unsigned short int significand[4];
15014 unsigned short int exponent;
15015 unsigned short int __glibc_reserved1[3];
15016};
15017
15018struct _libc_xmmreg
15019{
15020 __uint32_t element[4];
15021};
15022
15023struct _libc_fpstate
15024{
15025
15026 __uint16_t cwd;
15027 __uint16_t swd;
15028 __uint16_t ftw;
15029 __uint16_t fop;
15030 __uint64_t rip;
15031 __uint64_t rdp;
15032 __uint32_t mxcsr;
15033 __uint32_t mxcr_mask;
15034 struct _libc_fpxreg _st[8];
15035 struct _libc_xmmreg _xmm[16];
15036 __uint32_t __glibc_reserved1[24];
15037};
15038
15039
15040typedef struct _libc_fpstate *fpregset_t;
15041
15042
15043typedef struct
15044 {
15045 gregset_t gregs;
15046
15047 fpregset_t fpregs;
15048 __extension__ unsigned long long __reserved1 [8];
15049} mcontext_t;
15050
15051
15052typedef struct ucontext_t
15053 {
15054 unsigned long int uc_flags;
15055 struct ucontext_t *uc_link;
15056 stack_t uc_stack;
15057 mcontext_t uc_mcontext;
15058 sigset_t uc_sigmask;
15059 struct _libc_fpstate __fpregs_mem;
15060 __extension__ unsigned long long int __ssp[4];
15061 } ucontext_t;
15062
15063
15064
15065
15066
15067
15068
15069extern int siginterrupt (int __sig, int __interrupt) __attribute__ ((__nothrow__ ));
15070
15071
15072
15073
15074
15075
15076
15077
15078
15079
15080
15081
15082
15083
15084
15085
15086enum
15087{
15088 SS_ONSTACK = 1,
15089 SS_DISABLE
15090};
15091
15092
15093
15094extern int sigaltstack (const stack_t *__restrict __ss,
15095 stack_t *__restrict __oss) __attribute__ ((__nothrow__ ));
15096
15097
15098
15099
15100
15101
15102
15103struct sigstack
15104 {
15105 void *ss_sp;
15106 int ss_onstack;
15107 };
15108
15109
15110
15111
15112
15113
15114
15115extern int sigstack (struct sigstack *__ss, struct sigstack *__oss)
15116 __attribute__ ((__nothrow__ )) __attribute__ ((__deprecated__));
15117
15118
15119
15120
15121
15122
15123extern int sighold (int __sig) __attribute__ ((__nothrow__ ));
15124
15125
15126extern int sigrelse (int __sig) __attribute__ ((__nothrow__ ));
15127
15128
15129extern int sigignore (int __sig) __attribute__ ((__nothrow__ ));
15130
15131
15132extern __sighandler_t sigset (int __sig, __sighandler_t __disp) __attribute__ ((__nothrow__ ));
15133
15134
15135
15136
15137
15138
15139
15140extern int pthread_sigmask (int __how,
15141 const __sigset_t *__restrict __newmask,
15142 __sigset_t *__restrict __oldmask)__attribute__ ((__nothrow__ ));
15143
15144
15145extern int pthread_kill (pthread_t __threadid, int __signo) __attribute__ ((__nothrow__ ));
15146
15147
15148
15149extern int pthread_sigqueue (pthread_t __threadid, int __signo,
15150 const union sigval __value) __attribute__ ((__nothrow__ ));
15151
15152
15153
15154
15155
15156
15157extern int __libc_current_sigrtmin (void) __attribute__ ((__nothrow__ ));
15158
15159extern int __libc_current_sigrtmax (void) __attribute__ ((__nothrow__ ));
15160
15161
15162
15163
15164extern int tgkill (__pid_t __tgid, __pid_t __tid, int __signal);
15165
15166
15167
15168
15169
15170
15171
15172
15173
15174
15175
15176
15177
15178
15179
15180
15181
15182
15183
15184
15185
15186
15187
15188
15189
15190
15191
15192
15193
15194
15195
15196
15197
15198
15199
15200
15201
15202
15203
15204typedef long int __jmp_buf[8];
15205
15206
15207
15208struct __jmp_buf_tag
15209 {
15210
15211
15212
15213
15214 __jmp_buf __jmpbuf;
15215 int __mask_was_saved;
15216 __sigset_t __saved_mask;
15217 };
15218
15219
15220typedef struct __jmp_buf_tag jmp_buf[1];
15221
15222
15223
15224extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__));
15225
15226
15227
15228
15229extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) __attribute__ ((__nothrow__));
15230
15231
15232
15233extern int _setjmp (struct __jmp_buf_tag __env[1]) __attribute__ ((__nothrow__));
15234
15235
15236
15237
15238
15239
15240
15241extern void longjmp (struct __jmp_buf_tag __env[1], int __val)
15242 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
15243
15244
15245
15246
15247
15248extern void _longjmp (struct __jmp_buf_tag __env[1], int __val)
15249 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
15250
15251
15252
15253
15254
15255
15256
15257typedef struct __jmp_buf_tag sigjmp_buf[1];
15258
15259
15260
15261
15262
15263
15264
15265
15266extern void siglongjmp (sigjmp_buf __env, int __val)
15267 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
15268
15269
15270
15271
15272
15273
15274extern void longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
15275
15276
15277extern void _longjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
15278
15279
15280extern void siglongjmp (struct __jmp_buf_tag __env[1], int __val) __asm__ ("" "__longjmp_chk") __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
15281
15282
15283
15284
15285
15286
15287
15288
15289
15290
15291
15292
15293
15294
15295
15296
15297
15298
15299
15300
15301
15302
15303
15304
15305
15306
15307static inline char *container_of_or_null_(void *member_ptr, size_t offset)
15308{
15309 return member_ptr ? (char *)member_ptr - offset : ((void*)0);
15310}
15311struct list_node
15312{
15313 struct list_node *next, *prev;
15314};
15315struct list_head
15316{
15317 struct list_node n;
15318};
15319
15320static inline void list_head_init(struct list_head *h)
15321{
15322 h->n.next = h->n.prev = &h->n;
15323}
15324static inline void list_node_init(struct list_node *n)
15325{
15326 n->next = n->prev = n;
15327}
15328static inline void list_add_after_(struct list_head *h,
15329 struct list_node *p,
15330 struct list_node *n,
15331 const char *abortstr)
15332{
15333 n->next = p->next;
15334 n->prev = p;
15335 p->next->prev = n;
15336 p->next = n;
15337 (void)((void)abortstr, h);
15338}
15339static inline void list_add_(struct list_head *h,
15340 struct list_node *n,
15341 const char *abortstr)
15342{
15343 list_add_after_(h, &h->n, n, abortstr);
15344}
15345static inline void list_add_before_(struct list_head *h,
15346 struct list_node *p,
15347 struct list_node *n,
15348 const char *abortstr)
15349{
15350 n->next = p;
15351 n->prev = p->prev;
15352 p->prev->next = n;
15353 p->prev = n;
15354 (void)((void)abortstr, h);
15355}
15356static inline void list_add_tail_(struct list_head *h,
15357 struct list_node *n,
15358 const char *abortstr)
15359{
15360 list_add_before_(h, &h->n, n, abortstr);
15361}
15362static inline int list_empty_(const struct list_head *h, const char* abortstr)
15363{
15364 (void)((void)abortstr, h);
15365 return h->n.next == &h->n;
15366}
15367static inline _Bool list_empty_nocheck(const struct list_head *h)
15368{
15369 return h->n.next == &h->n;
15370}
15371static inline void list_del_(struct list_node *n, const char* abortstr)
15372{
15373 (void)((void)abortstr, n);
15374 n->next->prev = n->prev;
15375 n->prev->next = n->next;
15376
15377
15378
15379
15380}
15381static inline void list_del_init_(struct list_node *n, const char *abortstr)
15382{
15383 list_del_(n, abortstr);
15384 list_node_init(n);
15385}
15386static inline void list_del_from(struct list_head *h, struct list_node *n)
15387{
15388 ((void) (0));
15389 list_del_(n, "./ccan/list/list.h" ":" "329");
15390}
15391static inline void list_swap_(struct list_node *o,
15392 struct list_node *n,
15393 const char* abortstr)
15394{
15395 (void)((void)abortstr, o);
15396 *n = *o;
15397 n->next->prev = n;
15398 n->prev->next = n;
15399
15400
15401
15402
15403}
15404
15405
15406static inline const void *list_top_(const struct list_head *h, size_t off)
15407{
15408 if (list_empty_(h, "./ccan/list/list.h" ":" "399"))
15409 return ((void*)0);
15410 return (const char *)h->n.next - off;
15411}
15412
15413
15414static inline const void *list_pop_(const struct list_head *h, size_t off)
15415{
15416 struct list_node *n;
15417
15418 if (list_empty_(h, "./ccan/list/list.h" ":" "425"))
15419 return ((void*)0);
15420 n = h->n.next;
15421 list_del_(n, "./ccan/list/list.h" ":" "428");
15422 return (const char *)n - off;
15423}
15424
15425
15426static inline const void *list_tail_(const struct list_head *h, size_t off)
15427{
15428 if (list_empty_(h, "./ccan/list/list.h" ":" "451"))
15429 return ((void*)0);
15430 return (const char *)h->n.prev - off;
15431}
15432
15433static inline void list_append_list_(struct list_head *to,
15434 struct list_head *from,
15435 const char *abortstr)
15436{
15437 struct list_node *from_tail = ((void)abortstr, from)->n.prev;
15438 struct list_node *to_tail = ((void)abortstr, to)->n.prev;
15439
15440
15441 to->n.prev = from_tail;
15442 from_tail->next = &to->n;
15443 to_tail->next = &from->n;
15444 from->n.prev = to_tail;
15445
15446
15447 list_del_(&from->n, "./ccan/list/list.h" ":" "600");
15448 list_head_init(from);
15449}
15450static inline void list_prepend_list_(struct list_head *to,
15451 struct list_head *from,
15452 const char *abortstr)
15453{
15454 struct list_node *from_tail = ((void)abortstr, from)->n.prev;
15455 struct list_node *to_head = ((void)abortstr, to)->n.next;
15456
15457
15458 to->n.next = &from->n;
15459 from->n.prev = &to->n;
15460 to_head->prev = from_tail;
15461 from_tail->next = to_head;
15462
15463
15464 list_del_(&from->n, "./ccan/list/list.h" ":" "632");
15465 list_head_init(from);
15466}
15467
15468
15469
15470
15471
15472
15473
15474
15475
15476
15477
15478
15479
15480
15481
15482
15483
15484
15485
15486
15487
15488
15489
15490
15491static inline void *list_node_to_off_(struct list_node *node, size_t off)
15492{
15493 return (void *)((char *)node - off);
15494}
15495static inline struct list_node *list_node_from_off_(void *ptr, size_t off)
15496{
15497 return (struct list_node *)((char *)ptr + off);
15498}
15499
15500
15501
15502
15503
15504
15505
15506
15507
15508
15509
15510
15511
15512
15513static inline void *list_entry_or_null(const struct list_head *h,
15514 const struct list_node *n,
15515 size_t off)
15516{
15517 if (n == &h->n)
15518 return ((void*)0);
15519 return (char *)n - off;
15520}
15521
15522enum ruby_id_types {
15523 RUBY_ID_STATIC_SYM = 0x01,
15524 RUBY_ID_LOCAL = 0x00,
15525 RUBY_ID_INSTANCE = (0x01<<1),
15526 RUBY_ID_GLOBAL = (0x03<<1),
15527 RUBY_ID_ATTRSET = (0x04<<1),
15528 RUBY_ID_CONST = (0x05<<1),
15529 RUBY_ID_CLASS = (0x06<<1),
15530 RUBY_ID_JUNK = (0x07<<1),
15531 RUBY_ID_INTERNAL = RUBY_ID_JUNK,
15532 RUBY_ID_SCOPE_SHIFT = 4,
15533 RUBY_ID_SCOPE_MASK = (~(~0U<<(RUBY_ID_SCOPE_SHIFT-1))<<1)
15534};
15535
15536
15537
15538
15539
15540enum ruby_method_ids {
15541 idDot2 = 128,
15542 idDot3 = 129,
15543 idUPlus = 132,
15544 idUMinus = 133,
15545 idPow = 134,
15546 idCmp = 135,
15547 idPLUS = '+',
15548 idMINUS = '-',
15549 idMULT = '*',
15550 idDIV = '/',
15551 idMOD = '%',
15552 idLTLT = 136,
15553 idGTGT = 137,
15554 idLT = '<',
15555 idLE = 138,
15556 idGT = '>',
15557 idGE = 139,
15558 idEq = 140,
15559 idEqq = 141,
15560 idNeq = 142,
15561 idNot = '!',
15562 idAnd = '&',
15563 idOr = '|',
15564 idBackquote = '`',
15565 idEqTilde = 143,
15566 idNeqTilde = 144,
15567 idAREF = 145,
15568 idASET = 146,
15569 idCOLON2 = 147,
15570 idANDOP = 148,
15571 idOROP = 149,
15572 idANDDOT = 150,
15573 tPRESERVED_ID_BEGIN = 150,
15574 idNilP,
15575 idNULL,
15576 idEmptyP,
15577 idEqlP,
15578 idRespond_to,
15579 idRespond_to_missing,
15580 idIFUNC,
15581 idCFUNC,
15582 id_core_set_method_alias,
15583 id_core_set_variable_alias,
15584 id_core_undef_method,
15585 id_core_define_method,
15586 id_core_define_singleton_method,
15587 id_core_set_postexe,
15588 id_core_hash_merge_ptr,
15589 id_core_hash_merge_kwd,
15590 id_core_raise,
15591 id_debug_created_info,
15592 tPRESERVED_ID_END,
15593 tTOKEN_LOCAL_BEGIN = tPRESERVED_ID_END-1,
15594 tMax,
15595 tMin,
15596 tFreeze,
15597 tInspect,
15598 tIntern,
15599 tObject_id,
15600 tConst_missing,
15601 tMethodMissing,
15602 tMethod_added,
15603 tSingleton_method_added,
15604 tMethod_removed,
15605 tSingleton_method_removed,
15606 tMethod_undefined,
15607 tSingleton_method_undefined,
15608 tLength,
15609 tSize,
15610 tGets,
15611 tSucc,
15612 tEach,
15613 tProc,
15614 tLambda,
15615 tSend,
15616 t__send__,
15617 t__attached__,
15618 tInitialize,
15619 tInitialize_copy,
15620 tInitialize_clone,
15621 tInitialize_dup,
15622 tTo_int,
15623 tTo_ary,
15624 tTo_str,
15625 tTo_sym,
15626 tTo_hash,
15627 tTo_proc,
15628 tTo_io,
15629 tTo_a,
15630 tTo_s,
15631 tTo_i,
15632 tTo_f,
15633 tTo_r,
15634 tBt,
15635 tBt_locations,
15636 tCall,
15637 tMesg,
15638 tException,
15639 tLocals,
15640 tNOT,
15641 tAND,
15642 tOR,
15643 tDiv,
15644 tDivmod,
15645 tFdiv,
15646 tQuo,
15647 tName,
15648 tNil,
15649 tUScore,
15650 tNUMPARAM_1,
15651 tNUMPARAM_2,
15652 tNUMPARAM_3,
15653 tNUMPARAM_4,
15654 tNUMPARAM_5,
15655 tNUMPARAM_6,
15656 tNUMPARAM_7,
15657 tNUMPARAM_8,
15658 tNUMPARAM_9,
15659 tTOKEN_LOCAL_END,
15660 tTOKEN_INSTANCE_BEGIN = tTOKEN_LOCAL_END-1,
15661 tTOKEN_INSTANCE_END,
15662 tTOKEN_GLOBAL_BEGIN = tTOKEN_INSTANCE_END-1,
15663 tLASTLINE,
15664 tBACKREF,
15665 tERROR_INFO,
15666 tTOKEN_GLOBAL_END,
15667 tTOKEN_CONST_BEGIN = tTOKEN_GLOBAL_END-1,
15668 tTOKEN_CONST_END,
15669 tTOKEN_CLASS_BEGIN = tTOKEN_CONST_END-1,
15670 tTOKEN_CLASS_END,
15671 tTOKEN_ATTRSET_BEGIN = tTOKEN_CLASS_END-1,
15672 tTOKEN_ATTRSET_END,
15673 tNEXT_ID = tTOKEN_ATTRSET_END,
15674 idMax = ((tMax<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15675 idMin = ((tMin<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15676 idFreeze = ((tFreeze<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15677 idInspect = ((tInspect<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15678 idIntern = ((tIntern<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15679 idObject_id = ((tObject_id<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15680 idConst_missing = ((tConst_missing<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15681 idMethodMissing = ((tMethodMissing<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15682 idMethod_added = ((tMethod_added<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15683 idSingleton_method_added = ((tSingleton_method_added<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15684 idMethod_removed = ((tMethod_removed<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15685 idSingleton_method_removed = ((tSingleton_method_removed<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15686 idMethod_undefined = ((tMethod_undefined<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15687 idSingleton_method_undefined = ((tSingleton_method_undefined<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15688 idLength = ((tLength<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15689 idSize = ((tSize<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15690 idGets = ((tGets<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15691 idSucc = ((tSucc<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15692 idEach = ((tEach<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15693 idProc = ((tProc<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15694 idLambda = ((tLambda<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15695 idSend = ((tSend<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15696 id__send__ = ((t__send__<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15697 id__attached__ = ((t__attached__<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15698 idInitialize = ((tInitialize<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15699 idInitialize_copy = ((tInitialize_copy<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15700 idInitialize_clone = ((tInitialize_clone<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15701 idInitialize_dup = ((tInitialize_dup<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15702 idTo_int = ((tTo_int<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15703 idTo_ary = ((tTo_ary<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15704 idTo_str = ((tTo_str<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15705 idTo_sym = ((tTo_sym<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15706 idTo_hash = ((tTo_hash<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15707 idTo_proc = ((tTo_proc<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15708 idTo_io = ((tTo_io<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15709 idTo_a = ((tTo_a<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15710 idTo_s = ((tTo_s<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15711 idTo_i = ((tTo_i<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15712 idTo_f = ((tTo_f<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15713 idTo_r = ((tTo_r<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15714 idBt = ((tBt<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15715 idBt_locations = ((tBt_locations<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15716 idCall = ((tCall<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15717 idMesg = ((tMesg<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15718 idException = ((tException<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15719 idLocals = ((tLocals<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15720 idNOT = ((tNOT<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15721 idAND = ((tAND<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15722 idOR = ((tOR<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15723 idDiv = ((tDiv<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15724 idDivmod = ((tDivmod<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15725 idFdiv = ((tFdiv<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15726 idQuo = ((tQuo<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15727 idName = ((tName<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15728 idNil = ((tNil<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15729 idUScore = ((tUScore<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15730 idNUMPARAM_1 = ((tNUMPARAM_1<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15731 idNUMPARAM_2 = ((tNUMPARAM_2<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15732 idNUMPARAM_3 = ((tNUMPARAM_3<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15733 idNUMPARAM_4 = ((tNUMPARAM_4<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15734 idNUMPARAM_5 = ((tNUMPARAM_5<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15735 idNUMPARAM_6 = ((tNUMPARAM_6<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15736 idNUMPARAM_7 = ((tNUMPARAM_7<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15737 idNUMPARAM_8 = ((tNUMPARAM_8<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15738 idNUMPARAM_9 = ((tNUMPARAM_9<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_LOCAL|RUBY_ID_STATIC_SYM),
15739 idLASTLINE = ((tLASTLINE<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_GLOBAL|RUBY_ID_STATIC_SYM),
15740 idBACKREF = ((tBACKREF<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_GLOBAL|RUBY_ID_STATIC_SYM),
15741 idERROR_INFO = ((tERROR_INFO<<RUBY_ID_SCOPE_SHIFT)|RUBY_ID_GLOBAL|RUBY_ID_STATIC_SYM),
15742 tLAST_OP_ID = tPRESERVED_ID_END-1,
15743 idLAST_OP_ID = tLAST_OP_ID >> RUBY_ID_SCOPE_SHIFT
15744};
15745
15746
15747
15748
15749
15750
15751
15752
15753
15754
15755
15756
15757
15758
15759
15760
15761
15762
15763
15764
15765
15766
15767
15768
15769
15770
15771
15772
15773
15774
15775
15776
15777
15778
15779
15780
15781
15782
15783
15784void rb_obj_info_dump(VALUE obj);
15785void rb_obj_info_dump_loc(VALUE obj, const char *file, int line, const char *func);
15786
15787
15788
15789void ruby_debug_breakpoint(void);
15790__attribute__((__format__(__printf__, (1), (2)))) void ruby_debug_printf(const char*, ...);
15791
15792
15793
15794
15795
15796
15797
15798
15799
15800
15801
15802
15803
15804
15805
15806
15807
15808
15809
15810
15811VALUE rb_ary_last(int, const VALUE *, VALUE);
15812void rb_ary_set_len(VALUE, long);
15813void rb_ary_delete_same(VALUE, VALUE);
15814VALUE rb_ary_tmp_new_fill(long capa);
15815VALUE rb_ary_at(VALUE, VALUE);
15816size_t rb_ary_memsize(VALUE);
15817VALUE rb_to_array_type(VALUE obj);
15818static inline VALUE rb_ary_entry_internal(VALUE ary, long offset);
15819static inline _Bool ARY_PTR_USING_P(VALUE ary);
15820static inline void RARY_TRANSIENT_SET(VALUE ary);
15821static inline void RARY_TRANSIENT_UNSET(VALUE ary);
15822
15823
15824void rb_ary_detransient(VALUE a);
15825VALUE *rb_ary_ptr_use_start(VALUE ary);
15826void rb_ary_ptr_use_end(VALUE ary);
15827
15828VALUE rb_ary_tmp_new_from_values(VALUE, long, const VALUE *);
15829VALUE rb_check_to_array(VALUE ary);
15830VALUE rb_ary_behead(VALUE, long);
15831VALUE rb_ary_aref1(VALUE ary, VALUE i);
15832
15833static inline VALUE
15834rb_ary_entry_internal(VALUE ary, long offset)
15835{
15836 long len = rb_array_len(ary);
15837 const VALUE *ptr = rb_array_const_ptr_transient(ary);
15838 if (len == 0) return ((VALUE)RUBY_Qnil);
15839 if (offset < 0) {
15840 offset += len;
15841 if (offset < 0) return ((VALUE)RUBY_Qnil);
15842 }
15843 else if (len <= offset) {
15844 return ((VALUE)RUBY_Qnil);
15845 }
15846 return ptr[offset];
15847}
15848
15849static inline _Bool
15850ARY_PTR_USING_P(VALUE ary)
15851{
15852 return RB_FL_TEST_RAW(ary, ((VALUE)RUBY_FL_USER14));
15853}
15854
15855static inline void
15856RARY_TRANSIENT_SET(VALUE ary)
15857{
15858
15859 RB_FL_SET_RAW(ary, RARRAY_TRANSIENT_FLAG);
15860
15861}
15862
15863static inline void
15864RARY_TRANSIENT_UNSET(VALUE ary)
15865{
15866
15867 RB_FL_UNSET_RAW(ary, RARRAY_TRANSIENT_FLAG);
15868
15869}
15870
15871__attribute__((__pure__))
15872__attribute__((__artificial__))
15873static inline VALUE
15874RARRAY_AREF(VALUE ary, long i)
15875{
15876 ((void)0);
15877
15878 return rb_array_const_ptr_transient(ary)[i];
15879}
15880
15881typedef unsigned
15882 long long
15883 rb_serial_t;
15884
15885
15886
15887
15888
15889
15894struct rb_calling_info;
15895struct rb_call_data;
15896
15897enum method_missing_reason {
15898 MISSING_NOENTRY = 0x00,
15899 MISSING_PRIVATE = 0x01,
15900 MISSING_PROTECTED = 0x02,
15901 MISSING_FCALL = 0x04,
15902 MISSING_VCALL = 0x08,
15903 MISSING_SUPER = 0x10,
15904 MISSING_MISSING = 0x20,
15905 MISSING_NONE = 0x40
15906};
15907
15908
15909rb_serial_t rb_next_class_serial(void);
15910
15911
15912VALUE rb_obj_is_thread(VALUE obj);
15913void rb_vm_mark(void *ptr);
15914__attribute__((__pure__)) VALUE rb_vm_top_self(void);
15915void rb_vm_inc_const_missing_count(void);
15916const void **rb_vm_get_insns_address_table(void);
15917VALUE rb_source_location(int *pline);
15918const char *rb_source_location_cstr(int *pline);
15919static void rb_vm_pop_cfunc_frame(void);
15920int rb_vm_add_root_module(ID id, VALUE module);
15921void rb_vm_check_redefinition_by_prepend(VALUE klass);
15922int rb_vm_check_optimizable_mid(VALUE mid);
15923VALUE rb_yield_refine_block(VALUE refinement, VALUE refinements);
15924static VALUE ruby_vm_special_exception_copy(VALUE);
15925__attribute__((__pure__)) st_table *rb_vm_fstring_table(void);
15926
15927VALUE rb_vm_exec(struct rb_execution_context_struct *, int);
15928
15929
15930VALUE rb_current_realfilepath(void);
15931VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE);
15932typedef void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE);
15933VALUE rb_check_funcall_with_hook(VALUE recv, ID mid, int argc, const VALUE *argv,
15934 rb_check_funcall_hook *hook, VALUE arg);
15935VALUE rb_check_funcall_with_hook_kw(VALUE recv, ID mid, int argc, const VALUE *argv,
15936 rb_check_funcall_hook *hook, VALUE arg, int kw_splat);
15937const char *rb_type_str(enum ruby_value_type type);
15938VALUE rb_check_funcall_default(VALUE, ID, int, const VALUE *, VALUE);
15939VALUE rb_yield_1(VALUE val);
15940VALUE rb_yield_force_blockarg(VALUE values);
15941VALUE rb_lambda_call(VALUE obj, ID mid, int argc, const VALUE *argv,
15942 rb_block_call_func_t bl_proc, int min_argc, int max_argc,
15943 VALUE data2);
15944
15945VALUE rb_vm_call0(struct rb_execution_context_struct *ec, VALUE recv, ID id, int argc, const VALUE *argv, const struct rb_callable_method_entry_struct *me, int kw_splat);
15946VALUE rb_vm_call_kw(struct rb_execution_context_struct *ec, VALUE recv, VALUE id, int argc, const VALUE *argv, const struct rb_callable_method_entry_struct *me, int kw_splat);
15947VALUE rb_make_no_method_exception(VALUE exc, VALUE format, VALUE obj, int argc, const VALUE *argv, int priv);
15948
15949
15950VALUE rb_equal_opt(VALUE obj1, VALUE obj2);
15951VALUE rb_eql_opt(VALUE obj1, VALUE obj2);
15952
15953struct rb_iseq_struct;
15954void rb_vm_search_method_slowpath(VALUE cd_owner, struct rb_call_data *cd, VALUE klass);
15955
15956
15958int rb_ec_obj_respond_to(struct rb_execution_context_struct *ec, VALUE obj, ID id, int priv);
15959
15960
15961void rb_print_backtrace(void);
15962
15963
15964VALUE rb_vm_thread_backtrace(int argc, const VALUE *argv, VALUE thval);
15965VALUE rb_vm_thread_backtrace_locations(int argc, const VALUE *argv, VALUE thval);
15966VALUE rb_vm_backtrace(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
15967VALUE rb_vm_backtrace_locations(int argc, const VALUE * argv, struct rb_execution_context_struct * ec);
15968VALUE rb_make_backtrace(void);
15969void rb_backtrace_print_as_bugreport(void);
15970int rb_backtrace_p(VALUE obj);
15971VALUE rb_backtrace_to_str_ary(VALUE obj);
15972VALUE rb_backtrace_to_location_ary(VALUE obj);
15973void rb_backtrace_each(VALUE (*iter)(VALUE recv, VALUE str), VALUE output);
15974
15975VALUE rb_ec_backtrace_object(const struct rb_execution_context_struct *ec);
15976void rb_backtrace_use_iseq_first_lineno_for_last_location(VALUE self);
15977
15978
15979
15980
15981
15982
15983
15984
15985
15986
15987
15989struct rb_objspace;
15990
15991
15992
15993
15994
15995
15996
15997
15998extern VALUE *ruby_initial_gc_stress_ptr;
15999extern int ruby_disable_gc;
16000__attribute__((__malloc__)) void *ruby_mimmalloc(size_t size);
16001void ruby_mimfree(void *ptr);
16002void rb_objspace_set_event_hook(const rb_event_flag_t event);
16003VALUE rb_objspace_gc_enable(struct rb_objspace *);
16004VALUE rb_objspace_gc_disable(struct rb_objspace *);
16005void ruby_gc_set_params(void);
16006void rb_copy_wb_protected_attribute(VALUE dest, VALUE obj);
16007
16008__attribute__((__alloc_align__(1)))
16009
16010__attribute__((__malloc__)) void *rb_aligned_malloc(size_t, size_t) __attribute__((__alloc_size__ (2)));
16011size_t rb_size_mul_or_raise(size_t, size_t, VALUE);
16012size_t rb_size_mul_add_or_raise(size_t, size_t, size_t, VALUE);
16013__attribute__((__malloc__)) void *rb_xmalloc_mul_add(size_t, size_t, size_t);
16014void *rb_xrealloc_mul_add(const void *, size_t, size_t, size_t);
16015__attribute__((__malloc__)) void *rb_xmalloc_mul_add_mul(size_t, size_t, size_t, size_t);
16016__attribute__((__malloc__)) void *rb_xcalloc_mul_add_mul(size_t, size_t, size_t, size_t);
16017static inline void *ruby_sized_xrealloc_inlined(void *ptr, size_t new_size, size_t old_size) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2)));
16018static inline void *ruby_sized_xrealloc2_inlined(void *ptr, size_t new_count, size_t elemsiz, size_t old_count) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2, 3)));
16019static inline void ruby_sized_xfree_inlined(void *ptr, size_t size);
16020
16021VALUE rb_class_allocate_instance(VALUE klass);
16022
16023
16024const char *rb_objspace_data_type_name(VALUE obj);
16025VALUE rb_wb_protected_newobj_of(VALUE, VALUE);
16026VALUE rb_wb_unprotected_newobj_of(VALUE, VALUE);
16027size_t rb_obj_memsize_of(VALUE);
16028void rb_gc_verify_internal_consistency(void);
16029size_t rb_obj_gc_flags(VALUE, ID[], size_t);
16030void rb_gc_mark_values(long n, const VALUE *values);
16031void rb_gc_mark_vm_stack_values(long n, const VALUE *values);
16032void *ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2)));
16033void *ruby_sized_xrealloc2(void *ptr, size_t new_count, size_t element_size, size_t old_count) __attribute__((__returns_nonnull__)) __attribute__((__alloc_size__ (2, 3)));
16034void ruby_sized_xfree(void *x, size_t size);
16035
16036int rb_ec_stack_check(struct rb_execution_context_struct *ec);
16037void rb_gc_writebarrier_remember(VALUE obj);
16038const char *rb_obj_info(VALUE obj);
16039
16040
16041
16042static inline void *
16043ruby_sized_xrealloc_inlined(void *ptr, size_t new_size, size_t old_size)
16044{
16045 return ruby_xrealloc(ptr, new_size);
16046}
16047
16048static inline void *
16049ruby_sized_xrealloc2_inlined(void *ptr, size_t new_count, size_t elemsiz, size_t old_count)
16050{
16051 return ruby_xrealloc2(ptr, new_count, elemsiz);
16052}
16053
16054static inline void
16055ruby_sized_xfree_inlined(void *ptr, size_t size)
16056{
16057 ruby_xfree(ptr);
16058}
16059
16060
16061
16062
16063
16064
16065
16066
16067
16068
16069enum imemo_type {
16070 imemo_env = 0,
16071 imemo_cref = 1,
16072 imemo_svar = 2,
16073 imemo_throw_data = 3,
16074 imemo_ifunc = 4,
16075 imemo_memo = 5,
16076 imemo_ment = 6,
16077 imemo_iseq = 7,
16078 imemo_tmpbuf = 8,
16079 imemo_ast = 9,
16080 imemo_parser_strterm = 10,
16081 imemo_callinfo = 11,
16082 imemo_callcache = 12,
16083};
16084
16085
16086
16087
16088struct vm_svar {
16089 VALUE flags;
16090 const VALUE cref_or_me;
16091 const VALUE lastline;
16092 const VALUE backref;
16093 const VALUE others;
16094};
16095
16096
16097struct vm_throw_data {
16098 VALUE flags;
16099 VALUE reserved;
16100 const VALUE throw_obj;
16101 const struct rb_control_frame_struct *catch_frame;
16102 int throw_state;
16103};
16104
16105
16106
16107
16108struct vm_ifunc_argc {
16109
16110
16111
16112
16113 int min, max;
16114
16115};
16116
16117
16118struct vm_ifunc {
16119 VALUE flags;
16120 VALUE reserved;
16121 rb_block_call_func_t func;
16122 const void *data;
16123 struct vm_ifunc_argc argc;
16124};
16125
16127 VALUE flags;
16128 VALUE reserved;
16129 VALUE *ptr;
16130 struct rb_imemo_tmpbuf_struct *next;
16131 size_t cnt;
16132};
16133
16134
16135
16136
16137
16138struct MEMO {
16139 VALUE flags;
16140 VALUE reserved;
16141 const VALUE v1;
16142 const VALUE v2;
16143 union {
16144 long cnt;
16145 long state;
16146 const VALUE value;
16147 void (*func)(void);
16148 } u3;
16149};
16150
16151
16152
16153
16154
16155
16156
16157
16159VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0);
16160rb_imemo_tmpbuf_t *rb_imemo_tmpbuf_parser_heap(void *buf, rb_imemo_tmpbuf_t *old_heap, size_t cnt);
16161struct vm_ifunc *rb_vm_ifunc_new(rb_block_call_func_t func, const void *data, int min_argc, int max_argc);
16162void rb_strterm_mark(VALUE obj);
16163static inline enum imemo_type imemo_type(VALUE imemo);
16164static inline int imemo_type_p(VALUE imemo, enum imemo_type imemo_type);
16165static inline _Bool imemo_throw_data_p(VALUE imemo);
16166static inline struct vm_ifunc *rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data);
16167static inline VALUE rb_imemo_tmpbuf_auto_free_pointer(void);
16168static inline void *RB_IMEMO_TMPBUF_PTR(VALUE v);
16169static inline void *rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr);
16170static inline VALUE rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str);
16171static inline void MEMO_V1_SET(struct MEMO *m, VALUE v);
16172static inline void MEMO_V2_SET(struct MEMO *m, VALUE v);
16173
16174
16175
16176
16177
16178VALUE rb_imemo_new(enum imemo_type type, VALUE v1, VALUE v2, VALUE v3, VALUE v0);
16179
16180const char *rb_imemo_name(enum imemo_type type);
16181
16182static inline enum imemo_type
16183imemo_type(VALUE imemo)
16184{
16185 return (((struct RBasic *)(imemo))->flags >> ((VALUE)RUBY_FL_USHIFT)) & 0x0f;
16186}
16187
16188static inline int
16189imemo_type_p(VALUE imemo, enum imemo_type imemo_type)
16190{
16191 if ((__builtin_expect(!!(!RB_SPECIAL_CONST_P(imemo)), 1))) {
16192
16193 const VALUE mask = (0x0f << ((VALUE)RUBY_FL_USHIFT)) | RUBY_T_MASK;
16194 const VALUE expected_type = (imemo_type << ((VALUE)RUBY_FL_USHIFT)) | RUBY_T_IMEMO;
16195
16196 return expected_type == (((struct RBasic *)(imemo))->flags & mask);
16197 }
16198 else {
16199 return 0;
16200 }
16201}
16202
16203
16204static inline _Bool
16205imemo_throw_data_p(VALUE imemo)
16206{
16207 return (__builtin_constant_p(RUBY_T_IMEMO) ? rbimpl_RB_TYPE_P_fastpath((imemo), (RUBY_T_IMEMO)) : (RB_TYPE_P)((imemo), (RUBY_T_IMEMO)));
16208}
16209
16210static inline struct vm_ifunc *
16211rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data)
16212{
16213 return rb_vm_ifunc_new(func, data, 0, (-1));
16214}
16215
16216static inline VALUE
16217rb_imemo_tmpbuf_auto_free_pointer(void)
16218{
16219 return rb_imemo_new(imemo_tmpbuf, 0, 0, 0, 0);
16220}
16221
16222static inline void *
16223RB_IMEMO_TMPBUF_PTR(VALUE v)
16224{
16225 const struct rb_imemo_tmpbuf_struct *p = (const void *)v;
16226 return p->ptr;
16227}
16228
16229static inline void *
16230rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr)
16231{
16232 return ((rb_imemo_tmpbuf_t *)v)->ptr = ptr;
16233}
16234
16235static inline VALUE
16236rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str)
16237{
16238 const void *src;
16239 VALUE imemo;
16240 rb_imemo_tmpbuf_t *tmpbuf;
16241 void *dst;
16242 size_t len;
16243
16244 rb_string_value(&(str));
16245
16246 imemo = rb_imemo_tmpbuf_auto_free_pointer();
16247 tmpbuf = (rb_imemo_tmpbuf_t *)imemo;
16248 len = RSTRING_LEN(str);
16249 src = RSTRING_PTR(str);
16250 dst = ruby_xmalloc(len);
16251 ruby_nonempty_memcpy(dst, src, len);
16252 tmpbuf->ptr = dst;
16253 return imemo;
16254}
16255
16256static inline void
16257MEMO_V1_SET(struct MEMO *m, VALUE v)
16258{
16259 __extension__({
16260;
16261; __typeof__(rb_obj_write((VALUE)(m), (VALUE *)(&m->v1), (VALUE)(v), "./internal/imemo.h", 234)) unaligned_member_access_result = (rb_obj_write((VALUE)(m), (VALUE *)(&m->v1), (VALUE)(v), "./internal/imemo.h", 234));
16262; unaligned_member_access_result; });
16263}
16264
16265static inline void
16266MEMO_V2_SET(struct MEMO *m, VALUE v)
16267{
16268 __extension__({
16269;
16270; __typeof__(rb_obj_write((VALUE)(m), (VALUE *)(&m->v2), (VALUE)(v), "./internal/imemo.h", 240)) unaligned_member_access_result = (rb_obj_write((VALUE)(m), (VALUE *)(&m->v2), (VALUE)(v), "./internal/imemo.h", 240));
16271; unaligned_member_access_result; });
16272}
16273
16274
16275
16276
16277
16278
16279
16280
16281
16282
16283
16284
16285typedef enum {
16286 METHOD_VISI_UNDEF = 0x00,
16287 METHOD_VISI_PUBLIC = 0x01,
16288 METHOD_VISI_PRIVATE = 0x02,
16289 METHOD_VISI_PROTECTED = 0x03,
16290
16291 METHOD_VISI_MASK = 0x03
16292} rb_method_visibility_t;
16293
16294typedef struct rb_scope_visi_struct {
16295 rb_method_visibility_t method_visi : 3;
16296 unsigned int module_func : 1;
16298
16299
16300typedef struct rb_cref_struct {
16301 VALUE flags;
16302 VALUE refinements;
16303 VALUE klass;
16304 struct rb_cref_struct * next;
16305 const rb_scope_visibility_t scope_visi;
16306} rb_cref_t;
16307
16308
16309
16310typedef struct rb_method_entry_struct {
16311 VALUE flags;
16312 VALUE defined_class;
16313 struct rb_method_definition_struct * const def;
16314 ID called_id;
16315 VALUE owner;
16317
16318typedef struct rb_callable_method_entry_struct {
16319 VALUE flags;
16320 const VALUE defined_class;
16321 struct rb_method_definition_struct * const def;
16322 ID called_id;
16323 const VALUE owner;
16325
16326
16327static inline void
16328METHOD_ENTRY_VISI_SET(rb_method_entry_t *me, rb_method_visibility_t visi)
16329{
16330 ((void)0);
16331 me->flags = (me->flags & ~(((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) | (visi << ((((VALUE)RUBY_FL_USHIFT) + 4)+0));
16332}
16333static inline void
16334METHOD_ENTRY_BASIC_SET(rb_method_entry_t *me, unsigned int basic)
16335{
16336 ((void)0);
16337 me->flags = (me->flags & ~(((VALUE)RUBY_FL_USER6) )) | (basic << ((((VALUE)RUBY_FL_USHIFT) + 4)+2));
16338}
16339static inline void
16340METHOD_ENTRY_FLAGS_SET(rb_method_entry_t *me, rb_method_visibility_t visi, unsigned int basic)
16341{
16342 ((void)0);
16343 ((void)0);
16344 me->flags =
16345 (me->flags & ~(((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6))) |
16346 ((visi << ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) | (basic << ((((VALUE)RUBY_FL_USHIFT) + 4)+2)));
16347}
16348static inline void
16349METHOD_ENTRY_FLAGS_COPY(rb_method_entry_t *dst, const rb_method_entry_t *src)
16350{
16351 dst->flags =
16352 (dst->flags & ~(((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6))) |
16353 (src->flags & (((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6)));
16354}
16355
16356typedef enum {
16357 VM_METHOD_TYPE_ISEQ,
16358 VM_METHOD_TYPE_CFUNC,
16359 VM_METHOD_TYPE_ATTRSET,
16360 VM_METHOD_TYPE_IVAR,
16361 VM_METHOD_TYPE_BMETHOD,
16362 VM_METHOD_TYPE_ZSUPER,
16363 VM_METHOD_TYPE_ALIAS,
16364 VM_METHOD_TYPE_UNDEF,
16365 VM_METHOD_TYPE_NOTIMPLEMENTED,
16366 VM_METHOD_TYPE_OPTIMIZED,
16367 VM_METHOD_TYPE_MISSING,
16368 VM_METHOD_TYPE_REFINED,
16369
16370
16371} rb_method_type_t;
16372__extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (VM_METHOD_TYPE_REFINED <= (1<<4)) ? 2 : -1; })];
16373
16374
16375
16376typedef struct rb_iseq_struct rb_iseq_t;
16377
16378
16379typedef struct rb_method_iseq_struct {
16381 rb_cref_t * cref;
16383
16384typedef struct rb_method_cfunc_struct {
16385 VALUE (*func)();
16386 VALUE (*invoker)(VALUE recv, int argc, const VALUE *argv, VALUE (*func)());
16387 int argc;
16389
16390typedef struct rb_method_attr_struct {
16391 ID id;
16392 VALUE location;
16394
16395typedef struct rb_method_alias_struct {
16396 struct rb_method_entry_struct * original_me;
16398
16399typedef struct rb_method_refined_struct {
16400 struct rb_method_entry_struct * orig_me;
16401 VALUE owner;
16403
16404typedef struct rb_method_bmethod_struct {
16405 VALUE proc;
16406 struct rb_hook_list_struct *hooks;
16408
16409enum method_optimized_type {
16410 OPTIMIZED_METHOD_TYPE_SEND,
16411 OPTIMIZED_METHOD_TYPE_CALL,
16412 OPTIMIZED_METHOD_TYPE_BLOCK_CALL,
16413 OPTIMIZED_METHOD_TYPE__MAX
16414};
16415
16417 rb_method_type_t type : 4;
16418 int alias_count : 28;
16419 int complemented_count : 28;
16420
16421 union {
16422 rb_method_iseq_t iseq;
16423 rb_method_cfunc_t cfunc;
16424 rb_method_attr_t attr;
16425 rb_method_alias_t alias;
16426 rb_method_refined_t refined;
16427 rb_method_bmethod_t bmethod;
16428
16429 enum method_optimized_type optimize_type;
16430 } body;
16431
16432 ID original_id;
16433 uintptr_t method_serial;
16434};
16435
16436struct rb_id_table;
16437
16439__extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (__builtin_offsetof(rb_method_definition_t, body)==8) ? 2 : -1; })];
16440
16441
16442
16443
16444void rb_add_method_cfunc(VALUE klass, ID mid, VALUE (*func)(), int argc, rb_method_visibility_t visi);
16445void rb_add_method_iseq(VALUE klass, ID mid, const rb_iseq_t *iseq, rb_cref_t *cref, rb_method_visibility_t visi);
16446void rb_add_refined_method_entry(VALUE refined_class, ID mid);
16447void rb_add_method(VALUE klass, ID mid, rb_method_type_t type, void *option, rb_method_visibility_t visi);
16448
16449rb_method_entry_t *rb_method_entry_set(VALUE klass, ID mid, const rb_method_entry_t *, rb_method_visibility_t noex);
16450rb_method_entry_t *rb_method_entry_create(ID called_id, VALUE klass, rb_method_visibility_t visi, const rb_method_definition_t *def);
16451
16452const rb_method_entry_t *rb_method_entry_at(VALUE obj, ID id);
16453
16454const rb_method_entry_t *rb_method_entry(VALUE klass, ID id);
16455const rb_method_entry_t *rb_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class);
16456const rb_method_entry_t *rb_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class);
16457const rb_method_entry_t *rb_resolve_refined_method(VALUE refinements, const rb_method_entry_t *me);
16458const rb_method_entry_t *rb_resolve_me_location(const rb_method_entry_t *, VALUE[5]);
16459
16460const rb_callable_method_entry_t *rb_callable_method_entry(VALUE klass, ID id);
16461const rb_callable_method_entry_t *rb_callable_method_entry_with_refinements(VALUE klass, ID id, VALUE *defined_class);
16462const rb_callable_method_entry_t *rb_callable_method_entry_without_refinements(VALUE klass, ID id, VALUE *defined_class);
16463
16464int rb_method_entry_arity(const rb_method_entry_t *me);
16465int rb_method_entry_eq(const rb_method_entry_t *m1, const rb_method_entry_t *m2);
16466st_index_t rb_hash_method_entry(st_index_t hash, const rb_method_entry_t *me);
16467
16468VALUE rb_method_entry_location(const rb_method_entry_t *me);
16469
16470void rb_free_method_entry(const rb_method_entry_t *me);
16471
16472const rb_method_entry_t *rb_method_entry_clone(const rb_method_entry_t *me);
16473const rb_callable_method_entry_t *rb_method_entry_complement_defined_class(const rb_method_entry_t *src_me, ID called_id, VALUE defined_class);
16474void rb_method_entry_copy(rb_method_entry_t *dst, const rb_method_entry_t *src);
16475
16476void rb_method_table_insert(VALUE klass, struct rb_id_table *table, ID method_id, const rb_method_entry_t *me);
16477
16478void rb_scope_visibility_set(rb_method_visibility_t);
16479
16480VALUE rb_unnamed_parameters(int arity);
16481
16482void rb_clear_method_cache(VALUE klass_or_module, ID mid);
16483void rb_clear_method_cache_all(void);
16484
16485enum node_type {
16486 NODE_SCOPE,
16487 NODE_BLOCK,
16488 NODE_IF,
16489 NODE_UNLESS,
16490 NODE_CASE,
16491 NODE_CASE2,
16492 NODE_CASE3,
16493 NODE_WHEN,
16494 NODE_IN,
16495 NODE_WHILE,
16496 NODE_UNTIL,
16497 NODE_ITER,
16498 NODE_FOR,
16499 NODE_FOR_MASGN,
16500 NODE_BREAK,
16501 NODE_NEXT,
16502 NODE_REDO,
16503 NODE_RETRY,
16504 NODE_BEGIN,
16505 NODE_RESCUE,
16506 NODE_RESBODY,
16507 NODE_ENSURE,
16508 NODE_AND,
16509 NODE_OR,
16510 NODE_MASGN,
16511 NODE_LASGN,
16512 NODE_DASGN,
16513 NODE_DASGN_CURR,
16514 NODE_GASGN,
16515 NODE_IASGN,
16516 NODE_CDECL,
16517 NODE_CVASGN,
16518 NODE_OP_ASGN1,
16519 NODE_OP_ASGN2,
16520 NODE_OP_ASGN_AND,
16521 NODE_OP_ASGN_OR,
16522 NODE_OP_CDECL,
16523 NODE_CALL,
16524 NODE_OPCALL,
16525 NODE_FCALL,
16526 NODE_VCALL,
16527 NODE_QCALL,
16528 NODE_SUPER,
16529 NODE_ZSUPER,
16530 NODE_LIST,
16531 NODE_ZLIST,
16532 NODE_VALUES,
16533 NODE_HASH,
16534 NODE_RETURN,
16535 NODE_YIELD,
16536 NODE_LVAR,
16537 NODE_DVAR,
16538 NODE_GVAR,
16539 NODE_IVAR,
16540 NODE_CONST,
16541 NODE_CVAR,
16542 NODE_NTH_REF,
16543 NODE_BACK_REF,
16544 NODE_MATCH,
16545 NODE_MATCH2,
16546 NODE_MATCH3,
16547 NODE_LIT,
16548 NODE_STR,
16549 NODE_DSTR,
16550 NODE_XSTR,
16551 NODE_DXSTR,
16552 NODE_EVSTR,
16553 NODE_DREGX,
16554 NODE_ONCE,
16555 NODE_ARGS,
16556 NODE_ARGS_AUX,
16557 NODE_OPT_ARG,
16558 NODE_KW_ARG,
16559 NODE_POSTARG,
16560 NODE_ARGSCAT,
16561 NODE_ARGSPUSH,
16562 NODE_SPLAT,
16563 NODE_BLOCK_PASS,
16564 NODE_DEFN,
16565 NODE_DEFS,
16566 NODE_ALIAS,
16567 NODE_VALIAS,
16568 NODE_UNDEF,
16569 NODE_CLASS,
16570 NODE_MODULE,
16571 NODE_SCLASS,
16572 NODE_COLON2,
16573 NODE_COLON3,
16574 NODE_DOT2,
16575 NODE_DOT3,
16576 NODE_FLIP2,
16577 NODE_FLIP3,
16578 NODE_SELF,
16579 NODE_NIL,
16580 NODE_TRUE,
16581 NODE_FALSE,
16582 NODE_ERRINFO,
16583 NODE_DEFINED,
16584 NODE_POSTEXE,
16585 NODE_DSYM,
16586 NODE_ATTRASGN,
16587 NODE_LAMBDA,
16588 NODE_ARYPTN,
16589 NODE_HSHPTN,
16590 NODE_FNDPTN,
16591 NODE_LAST
16592};
16593
16594typedef struct rb_code_position_struct {
16595 int lineno;
16596 int column;
16598
16599typedef struct rb_code_location_struct {
16600 rb_code_position_t beg_pos;
16601 rb_code_position_t end_pos;
16603
16604static inline rb_code_location_t
16605code_loc_gen(const rb_code_location_t *loc1, const rb_code_location_t *loc2)
16606{
16608 loc.beg_pos = loc1->beg_pos;
16609 loc.end_pos = loc2->end_pos;
16610 return loc;
16611}
16612
16613typedef struct RNode {
16614 VALUE flags;
16615 union {
16616 struct RNode *node;
16617 ID id;
16618 VALUE value;
16619 ID *tbl;
16620 } u1;
16621 union {
16622 struct RNode *node;
16623 ID id;
16624 long argc;
16625 VALUE value;
16626 } u2;
16627 union {
16628 struct RNode *node;
16629 ID id;
16630 long state;
16631 struct rb_args_info *args;
16632 struct rb_ary_pattern_info *apinfo;
16633 struct rb_fnd_pattern_info *fpinfo;
16634 VALUE value;
16635 } u3;
16636 rb_code_location_t nd_loc;
16637 int node_id;
16638} NODE;
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
16649
16650
16651
16652
16653
16654
16655
16656
16657
16658
16659
16660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679VALUE rb_node_case_when_optimizable_literal(const NODE *const node);
16680
16681
16682typedef struct node_buffer_struct node_buffer_t;
16683
16684typedef struct rb_ast_body_struct {
16685 const NODE *root;
16686 VALUE compile_option;
16687 int line_count;
16689typedef struct rb_ast_struct {
16690 VALUE flags;
16691 node_buffer_t *node_buffer;
16692 rb_ast_body_t body;
16693} rb_ast_t;
16694rb_ast_t *rb_ast_new(void);
16695void rb_ast_mark(rb_ast_t*);
16696void rb_ast_update_references(rb_ast_t*);
16697void rb_ast_add_local_table(rb_ast_t*, ID *buf);
16698void rb_ast_dispose(rb_ast_t*);
16699void rb_ast_free(rb_ast_t*);
16700size_t rb_ast_memsize(const rb_ast_t*);
16701void rb_ast_add_mark_object(rb_ast_t*, VALUE);
16702NODE *rb_ast_newnode(rb_ast_t*, enum node_type type);
16703void rb_ast_delete_node(rb_ast_t*, NODE *n);
16704
16705VALUE rb_parser_new(void);
16706VALUE rb_parser_end_seen_p(VALUE);
16707VALUE rb_parser_encoding(VALUE);
16708VALUE rb_parser_set_yydebug(VALUE, VALUE);
16709VALUE rb_parser_dump_tree(const NODE *node, int comment);
16710void rb_parser_set_options(VALUE, int, int, int, int);
16711
16712rb_ast_t *rb_parser_compile_string(VALUE, const char*, VALUE, int);
16713rb_ast_t *rb_parser_compile_string_path(VALUE vparser, VALUE fname, VALUE src, int line);
16714rb_ast_t *rb_parser_compile_file_path(VALUE vparser, VALUE fname, VALUE input, int line);
16715rb_ast_t *rb_parser_compile_generic(VALUE vparser, VALUE (*lex_gets)(VALUE, int), VALUE fname, VALUE input, int line);
16716
16717void rb_node_init(NODE *n, enum node_type type, VALUE a0, VALUE a1, VALUE a2);
16718const char *ruby_node_name(int node);
16719
16720const struct kwtable *rb_reserved_word(const char *, unsigned int);
16721
16722struct rb_args_info {
16723 NODE *pre_init;
16724 NODE *post_init;
16725
16726 int pre_args_num;
16727 int post_args_num;
16728
16729 ID first_post_arg;
16730
16731 ID rest_arg;
16732 ID block_arg;
16733
16734 NODE *kw_args;
16735 NODE *kw_rest_arg;
16736
16737 NODE *opt_args;
16738 unsigned int no_kwarg: 1;
16739 unsigned int ruby2_keywords: 1;
16740
16741 VALUE imemo;
16742};
16743
16744struct rb_ary_pattern_info {
16745 NODE *pre_args;
16746 NODE *rest_arg;
16747 NODE *post_args;
16748};
16749
16751 NODE *pre_rest_arg;
16752 NODE *args;
16753 NODE *post_rest_arg;
16754};
16755
16756struct parser_params;
16757void *rb_parser_malloc(struct parser_params *, size_t);
16758void *rb_parser_realloc(struct parser_params *, void *, size_t);
16759void *rb_parser_calloc(struct parser_params *, size_t, size_t);
16760void rb_parser_free(struct parser_params *, void *);
16761__attribute__((__format__(__printf__, (2), (3)))) void rb_parser_printf(struct parser_params *parser, const char *fmt, ...);
16762
16763
16764
16765
16766typedef unsigned int rb_atomic_t;
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
16848
16849
16850
16851
16852
16853
16854
16855
16856
16857
16858
16859
16860
16861
16862
16863
16864
16865
16866
16867
16868
16869
16870
16871
16872
16873
16874
16875
16876
16877
16878
16879
16880
16881
16882
16883struct sched_param
16884{
16885 int sched_priority;
16886};
16887
16888
16889
16890
16891
16892extern int clone (int (*__fn) (void *__arg), void *__child_stack,
16893 int __flags, void *__arg, ...) __attribute__ ((__nothrow__ ));
16894
16895
16896extern int unshare (int __flags) __attribute__ ((__nothrow__ ));
16897
16898
16899extern int sched_getcpu (void) __attribute__ ((__nothrow__ ));
16900
16901
16902extern int getcpu (unsigned int *, unsigned int *) __attribute__ ((__nothrow__ ));
16903
16904
16905extern int setns (int __fd, int __nstype) __attribute__ ((__nothrow__ ));
16906
16907
16908
16909
16910
16911
16912
16913
16914typedef unsigned long int __cpu_mask;
16915
16916
16917
16918
16919typedef struct
16920{
16921 __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
16922} cpu_set_t;
16923
16924
16925
16926
16927
16928
16929
16930
16931
16932
16933
16934
16935
16936
16937
16938
16939
16940
16941
16942
16943
16944
16945
16946
16947
16948
16949
16950
16951
16952extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
16953 __attribute__ ((__nothrow__ ));
16954extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__ )) __attribute__ ((__warn_unused_result__));
16955extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__ ));
16956
16957
16958
16959
16960
16961
16962
16963extern int sched_setparam (__pid_t __pid, const struct sched_param *__param)
16964 __attribute__ ((__nothrow__ ));
16965
16966
16967extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__ ));
16968
16969
16970extern int sched_setscheduler (__pid_t __pid, int __policy,
16971 const struct sched_param *__param) __attribute__ ((__nothrow__ ));
16972
16973
16974extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__ ));
16975
16976
16977extern int sched_yield (void) __attribute__ ((__nothrow__ ));
16978
16979
16980extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__ ));
16981
16982
16983extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__ ));
16984
16985
16986extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__ ));
16987
16988
16989
16990
16991
16992
16993
16994
16995
16996
16997
16998
16999
17000
17001
17002
17003
17004
17005
17006
17007
17008extern int sched_setaffinity (__pid_t __pid, size_t __cpusetsize,
17009 const cpu_set_t *__cpuset) __attribute__ ((__nothrow__ ));
17010
17011
17012extern int sched_getaffinity (__pid_t __pid, size_t __cpusetsize,
17013 cpu_set_t *__cpuset) __attribute__ ((__nothrow__ ));
17014
17015
17016
17017
17018
17019
17020
17021
17022
17023
17024
17025
17026
17027
17028
17029
17030
17031
17032
17033
17034enum
17035{
17036 PTHREAD_CREATE_JOINABLE,
17037 PTHREAD_CREATE_DETACHED
17038};
17039
17040
17041
17042enum
17043{
17044 PTHREAD_MUTEX_TIMED_NP,
17045 PTHREAD_MUTEX_RECURSIVE_NP,
17046 PTHREAD_MUTEX_ERRORCHECK_NP,
17047 PTHREAD_MUTEX_ADAPTIVE_NP
17048
17049 ,
17050 PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
17051 PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
17052 PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
17053 PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
17054
17055
17056
17057 , PTHREAD_MUTEX_FAST_NP = PTHREAD_MUTEX_TIMED_NP
17058
17059};
17060
17061
17062
17063
17064enum
17065{
17066 PTHREAD_MUTEX_STALLED,
17067 PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
17068 PTHREAD_MUTEX_ROBUST,
17069 PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
17070};
17071
17072
17073
17074
17075
17076enum
17077{
17078 PTHREAD_PRIO_NONE,
17079 PTHREAD_PRIO_INHERIT,
17080 PTHREAD_PRIO_PROTECT
17081};
17082
17083
17084
17085
17086
17087
17088
17089
17090
17091
17092
17093
17094
17095enum
17096{
17097 PTHREAD_RWLOCK_PREFER_READER_NP,
17098 PTHREAD_RWLOCK_PREFER_WRITER_NP,
17099 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
17100 PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
17101};
17102
17103
17104
17105
17106
17107
17108
17109
17110
17111
17112
17113enum
17114{
17115 PTHREAD_INHERIT_SCHED,
17116 PTHREAD_EXPLICIT_SCHED
17117};
17118
17119
17120
17121enum
17122{
17123 PTHREAD_SCOPE_SYSTEM,
17124 PTHREAD_SCOPE_PROCESS
17125};
17126
17127
17128
17129enum
17130{
17131 PTHREAD_PROCESS_PRIVATE,
17132 PTHREAD_PROCESS_SHARED
17133};
17134
17135
17136
17137
17138
17139
17140
17142{
17143 void (*__routine) (void *);
17144 void *__arg;
17145 int __canceltype;
17146 struct _pthread_cleanup_buffer *__prev;
17147};
17148
17149
17150enum
17151{
17152 PTHREAD_CANCEL_ENABLE,
17153 PTHREAD_CANCEL_DISABLE
17154};
17155enum
17156{
17157 PTHREAD_CANCEL_DEFERRED,
17158 PTHREAD_CANCEL_ASYNCHRONOUS
17159};
17160
17161
17162
17163
17164
17165
17166
17167
17168
17169
17170
17171
17172
17173
17174
17175
17176
17177extern int pthread_create (pthread_t *__restrict __newthread,
17178 const pthread_attr_t *__restrict __attr,
17179 void *(*__start_routine) (void *),
17180 void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
17181
17182
17183
17184
17185
17186extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
17187
17188
17189
17190
17191
17192
17193
17194extern int pthread_join (pthread_t __th, void **__thread_return);
17195
17196
17197
17198
17199extern int pthread_tryjoin_np (pthread_t __th, void **__thread_return) __attribute__ ((__nothrow__ ));
17200
17201
17202
17203
17204
17205
17206
17207extern int pthread_timedjoin_np (pthread_t __th, void **__thread_return,
17208 const struct timespec *__abstime);
17209extern int pthread_clockjoin_np (pthread_t __th, void **__thread_return,
17210 clockid_t __clockid,
17211 const struct timespec *__abstime);
17212
17213
17214
17215
17216
17217
17218extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__ ));
17219
17220
17221
17222extern pthread_t pthread_self (void) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
17223
17224
17225extern int pthread_equal (pthread_t __thread1, pthread_t __thread2)
17226 __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
17227
17228
17229
17230
17231
17232
17233
17234extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17235
17236
17237extern int pthread_attr_destroy (pthread_attr_t *__attr)
17238 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17239
17240
17241extern int pthread_attr_getdetachstate (const pthread_attr_t *__attr,
17242 int *__detachstate)
17243 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17244
17245
17246extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
17247 int __detachstate)
17248 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17249
17250
17251
17252extern int pthread_attr_getguardsize (const pthread_attr_t *__attr,
17253 size_t *__guardsize)
17254 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17255
17256
17257extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
17258 size_t __guardsize)
17259 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17260
17261
17262
17263extern int pthread_attr_getschedparam (const pthread_attr_t *__restrict __attr,
17264 struct sched_param *__restrict __param)
17265 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17266
17267
17268extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
17269 const struct sched_param *__restrict
17270 __param) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17271
17272
17273extern int pthread_attr_getschedpolicy (const pthread_attr_t *__restrict
17274 __attr, int *__restrict __policy)
17275 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17276
17277
17278extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
17279 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17280
17281
17282extern int pthread_attr_getinheritsched (const pthread_attr_t *__restrict
17283 __attr, int *__restrict __inherit)
17284 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17285
17286
17287extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
17288 int __inherit)
17289 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17290
17291
17292
17293extern int pthread_attr_getscope (const pthread_attr_t *__restrict __attr,
17294 int *__restrict __scope)
17295 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17296
17297
17298extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
17299 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17300
17301
17302extern int pthread_attr_getstackaddr (const pthread_attr_t *__restrict
17303 __attr, void **__restrict __stackaddr)
17304 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));
17305
17306
17307
17308
17309
17310extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
17311 void *__stackaddr)
17312 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));
17313
17314
17315extern int pthread_attr_getstacksize (const pthread_attr_t *__restrict
17316 __attr, size_t *__restrict __stacksize)
17317 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17318
17319
17320
17321
17322extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
17323 size_t __stacksize)
17324 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17325
17326
17327
17328extern int pthread_attr_getstack (const pthread_attr_t *__restrict __attr,
17329 void **__restrict __stackaddr,
17330 size_t *__restrict __stacksize)
17331 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2, 3)));
17332
17333
17334
17335
17336extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
17337 size_t __stacksize) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17338
17339
17340
17341
17342
17343extern int pthread_attr_setaffinity_np (pthread_attr_t *__attr,
17344 size_t __cpusetsize,
17345 const cpu_set_t *__cpuset)
17346 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3)));
17347
17348
17349
17350extern int pthread_attr_getaffinity_np (const pthread_attr_t *__attr,
17351 size_t __cpusetsize,
17352 cpu_set_t *__cpuset)
17353 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3)));
17354
17355
17356extern int pthread_getattr_default_np (pthread_attr_t *__attr)
17357 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17358
17359
17360
17361extern int pthread_setattr_default_np (const pthread_attr_t *__attr)
17362 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17363
17364
17365
17366
17367extern int pthread_getattr_np (pthread_t __th, pthread_attr_t *__attr)
17368 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
17369
17370
17371
17372
17373
17374
17375
17376extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
17377 const struct sched_param *__param)
17378 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));
17379
17380
17381extern int pthread_getschedparam (pthread_t __target_thread,
17382 int *__restrict __policy,
17383 struct sched_param *__restrict __param)
17384 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2, 3)));
17385
17386
17387extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
17388 __attribute__ ((__nothrow__ ));
17389
17390
17391
17392
17393extern int pthread_getname_np (pthread_t __target_thread, char *__buf,
17394 size_t __buflen)
17395 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
17396
17397
17398extern int pthread_setname_np (pthread_t __target_thread, const char *__name)
17399 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
17400
17401
17402
17403
17404
17405extern int pthread_getconcurrency (void) __attribute__ ((__nothrow__ ));
17406
17407
17408extern int pthread_setconcurrency (int __level) __attribute__ ((__nothrow__ ));
17409
17410
17411
17412
17413
17414
17415
17416extern int pthread_yield (void) __attribute__ ((__nothrow__ ));
17417
17418
17419
17420
17421extern int pthread_setaffinity_np (pthread_t __th, size_t __cpusetsize,
17422 const cpu_set_t *__cpuset)
17423 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));
17424
17425
17426extern int pthread_getaffinity_np (pthread_t __th, size_t __cpusetsize,
17427 cpu_set_t *__cpuset)
17428 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (3)));
17429extern int pthread_once (pthread_once_t *__once_control,
17430 void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));
17431extern int pthread_setcancelstate (int __state, int *__oldstate);
17432
17433
17434
17435extern int pthread_setcanceltype (int __type, int *__oldtype);
17436
17437
17438extern int pthread_cancel (pthread_t __th);
17439
17440
17441
17442
17443extern void pthread_testcancel (void);
17444
17445
17446
17447
17448typedef struct
17449{
17450 struct
17451 {
17452 __jmp_buf __cancel_jmp_buf;
17453 int __mask_was_saved;
17454 } __cancel_jmp_buf[1];
17455 void *__pad[4];
17456} __pthread_unwind_buf_t __attribute__ ((__aligned__));
17457
17458
17459
17460
17461
17462
17463
17465{
17466 void (*__cancel_routine) (void *);
17467 void *__cancel_arg;
17468 int __do_it;
17469 int __cancel_type;
17470};
17471extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
17472 ;
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
17483 ;
17484
17485
17486
17487
17488
17489extern void __pthread_register_cancel_defer (__pthread_unwind_buf_t *__buf)
17490 ;
17491
17492
17493
17494
17495
17496
17497
17498
17499
17500
17501extern void __pthread_unregister_cancel_restore (__pthread_unwind_buf_t *__buf)
17502 ;
17503
17504
17505
17506extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
17507 __attribute__ ((__noreturn__))
17508
17509 __attribute__ ((__weak__))
17510
17511 ;
17512
17513
17514
17515struct __jmp_buf_tag;
17516extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__));
17517
17518
17519
17520
17521
17522extern int pthread_mutex_init (pthread_mutex_t *__mutex,
17523 const pthread_mutexattr_t *__mutexattr)
17524 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17525
17526
17527extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
17528 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17529
17530
17531extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
17532 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
17533
17534
17535extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
17536 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
17537
17538
17539
17540extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
17541 const struct timespec *__restrict
17542 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
17543
17544
17545
17546extern int pthread_mutex_clocklock (pthread_mutex_t *__restrict __mutex,
17547 clockid_t __clockid,
17548 const struct timespec *__restrict
17549 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
17550
17551
17552
17553extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
17554 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
17555
17556
17557
17558extern int pthread_mutex_getprioceiling (const pthread_mutex_t *
17559 __restrict __mutex,
17560 int *__restrict __prioceiling)
17561 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17562
17563
17564
17565extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
17566 int __prioceiling,
17567 int *__restrict __old_ceiling)
17568 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 3)));
17569
17570
17571
17572
17573extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
17574 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17575
17576extern int pthread_mutex_consistent_np (pthread_mutex_t *__mutex)
17577 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17578extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
17579 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17580
17581
17582extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
17583 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17584
17585
17586extern int pthread_mutexattr_getpshared (const pthread_mutexattr_t *
17587 __restrict __attr,
17588 int *__restrict __pshared)
17589 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17590
17591
17592extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
17593 int __pshared)
17594 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17595
17596
17597
17598extern int pthread_mutexattr_gettype (const pthread_mutexattr_t *__restrict
17599 __attr, int *__restrict __kind)
17600 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17601
17602
17603
17604
17605extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
17606 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17607
17608
17609
17610extern int pthread_mutexattr_getprotocol (const pthread_mutexattr_t *
17611 __restrict __attr,
17612 int *__restrict __protocol)
17613 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17614
17615
17616
17617extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
17618 int __protocol)
17619 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17620
17621
17622extern int pthread_mutexattr_getprioceiling (const pthread_mutexattr_t *
17623 __restrict __attr,
17624 int *__restrict __prioceiling)
17625 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17626
17627
17628extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
17629 int __prioceiling)
17630 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17631
17632
17633
17634extern int pthread_mutexattr_getrobust (const pthread_mutexattr_t *__attr,
17635 int *__robustness)
17636 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17637
17638extern int pthread_mutexattr_getrobust_np (const pthread_mutexattr_t *__attr,
17639 int *__robustness)
17640 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17641
17642
17643
17644extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
17645 int __robustness)
17646 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17647
17648extern int pthread_mutexattr_setrobust_np (pthread_mutexattr_t *__attr,
17649 int __robustness)
17650 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17651extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
17652 const pthread_rwlockattr_t *__restrict
17653 __attr) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17654
17655
17656extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
17657 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17658
17659
17660extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
17661 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
17662
17663
17664extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
17665 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
17666
17667
17668
17669extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
17670 const struct timespec *__restrict
17671 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
17672
17673
17674
17675extern int pthread_rwlock_clockrdlock (pthread_rwlock_t *__restrict __rwlock,
17676 clockid_t __clockid,
17677 const struct timespec *__restrict
17678 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
17679
17680
17681
17682extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
17683 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
17684
17685
17686extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
17687 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
17688
17689
17690
17691extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
17692 const struct timespec *__restrict
17693 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
17694
17695
17696
17697extern int pthread_rwlock_clockwrlock (pthread_rwlock_t *__restrict __rwlock,
17698 clockid_t __clockid,
17699 const struct timespec *__restrict
17700 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
17701
17702
17703
17704extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
17705 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
17706
17707
17708
17709
17710
17711extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
17712 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17713
17714
17715extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
17716 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17717
17718
17719extern int pthread_rwlockattr_getpshared (const pthread_rwlockattr_t *
17720 __restrict __attr,
17721 int *__restrict __pshared)
17722 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17723
17724
17725extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
17726 int __pshared)
17727 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17728
17729
17730extern int pthread_rwlockattr_getkind_np (const pthread_rwlockattr_t *
17731 __restrict __attr,
17732 int *__restrict __pref)
17733 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17734
17735
17736extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
17737 int __pref) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17738
17739
17740
17741
17742
17743
17744
17745extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
17746 const pthread_condattr_t *__restrict __cond_attr)
17747 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17748
17749
17750extern int pthread_cond_destroy (pthread_cond_t *__cond)
17751 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17752
17753
17754extern int pthread_cond_signal (pthread_cond_t *__cond)
17755 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
17756
17757
17758extern int pthread_cond_broadcast (pthread_cond_t *__cond)
17759 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
17760
17761
17762
17763
17764
17765
17766extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
17767 pthread_mutex_t *__restrict __mutex)
17768 __attribute__ ((__nonnull__ (1, 2)));
17769extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
17770 pthread_mutex_t *__restrict __mutex,
17771 const struct timespec *__restrict __abstime)
17772 __attribute__ ((__nonnull__ (1, 2, 3)));
17773extern int pthread_cond_clockwait (pthread_cond_t *__restrict __cond,
17774 pthread_mutex_t *__restrict __mutex,
17775 __clockid_t __clock_id,
17776 const struct timespec *__restrict __abstime)
17777 __attribute__ ((__nonnull__ (1, 2, 4)));
17778
17779
17780
17781
17782
17783extern int pthread_condattr_init (pthread_condattr_t *__attr)
17784 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17785
17786
17787extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
17788 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17789
17790
17791extern int pthread_condattr_getpshared (const pthread_condattr_t *
17792 __restrict __attr,
17793 int *__restrict __pshared)
17794 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17795
17796
17797extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
17798 int __pshared) __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17799
17800
17801
17802extern int pthread_condattr_getclock (const pthread_condattr_t *
17803 __restrict __attr,
17804 __clockid_t *__restrict __clock_id)
17805 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17806
17807
17808extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
17809 __clockid_t __clock_id)
17810 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17811extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
17812 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17813
17814
17815extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
17816 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17817
17818
17819extern int pthread_spin_lock (pthread_spinlock_t *__lock)
17820 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
17821
17822
17823extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
17824 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
17825
17826
17827extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
17828 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
17829
17830
17831
17832
17833
17834
17835extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
17836 const pthread_barrierattr_t *__restrict
17837 __attr, unsigned int __count)
17838 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17839
17840
17841extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
17842 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17843
17844
17845extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
17846 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
17847
17848
17849
17850extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
17851 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17852
17853
17854extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
17855 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17856
17857
17858extern int pthread_barrierattr_getpshared (const pthread_barrierattr_t *
17859 __restrict __attr,
17860 int *__restrict __pshared)
17861 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1, 2)));
17862
17863
17864extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
17865 int __pshared)
17866 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17867extern int pthread_key_create (pthread_key_t *__key,
17868 void (*__destr_function) (void *))
17869 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (1)));
17870
17871
17872extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__ ));
17873
17874
17875extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__ ));
17876
17877
17878extern int pthread_setspecific (pthread_key_t __key,
17879 const void *__pointer) __attribute__ ((__nothrow__ )) ;
17880
17881
17882
17883
17884extern int pthread_getcpuclockid (pthread_t __thread_id,
17885 __clockid_t *__clock_id)
17886 __attribute__ ((__nothrow__ )) __attribute__ ((__nonnull__ (2)));
17887extern int pthread_atfork (void (*__prepare) (void),
17888 void (*__parent) (void),
17889 void (*__child) (void)) __attribute__ ((__nothrow__ ));
17890
17891
17892
17893
17894extern __inline __attribute__ ((__gnu_inline__)) int
17895__attribute__ ((__nothrow__ )) pthread_equal (pthread_t __thread1, pthread_t __thread2)
17896{
17897 return __thread1 == __thread2;
17898}
17899typedef pthread_t rb_nativethread_id_t;
17901
17902
17903
17904
17905
17906
17907
17908rb_nativethread_id_t rb_nativethread_self();
17909
17914
17915
17916
17917
17918
17919
17921
17922typedef struct native_thread_data_struct {
17923 union {
17924 struct list_node ubf;
17925 struct list_node gvl;
17926 } node;
17927
17928 union
17929
17930
17931
17932
17933
17934
17935
17936 {
17939 } cond;
17941
17942
17943typedef struct rb_global_vm_lock_struct {
17944
17945 const struct rb_thread_struct *owner;
17947 struct list_head waitq;
17948 const struct rb_thread_struct *timer;
17949 int timer_err;
17950
17951
17952 rb_nativethread_cond_t switch_cond;
17953 rb_nativethread_cond_t switch_wait_cond;
17954 int need_yield;
17955 int wait_yield;
17957
17958
17959
17960
17961
17962
17963
17964
17965
17966void *rb_allocate_sigaltstack(void);
17967void *rb_register_sigaltstack(void *);
17968void rb_vm_encoded_insn_data_table_init(void);
17969typedef unsigned long rb_num_t;
17970typedef signed long rb_snum_t;
17971
17972enum ruby_tag_type {
17973 RUBY_TAG_NONE = 0x0,
17974 RUBY_TAG_RETURN = 0x1,
17975 RUBY_TAG_BREAK = 0x2,
17976 RUBY_TAG_NEXT = 0x3,
17977 RUBY_TAG_RETRY = 0x4,
17978 RUBY_TAG_REDO = 0x5,
17979 RUBY_TAG_RAISE = 0x6,
17980 RUBY_TAG_THROW = 0x7,
17981 RUBY_TAG_FATAL = 0x8,
17982 RUBY_TAG_MASK = 0xf
17983};
17984
17985
17986enum ruby_vm_throw_flags {
17987 VM_THROW_NO_ESCAPE_FLAG = 0x8000,
17988 VM_THROW_STATE_MASK = 0xff
17989};
17990
17991
17992struct rb_thread_struct;
17994
17995
17997
17999 rb_serial_t ic_serial;
18000 const rb_cref_t *ic_cref;
18001 VALUE value;
18002};
18003
18005 rb_serial_t ic_serial;
18006 size_t index;
18007};
18008
18010 struct {
18011 struct rb_thread_struct *running_thread;
18012 VALUE value;
18013 } once;
18014 struct iseq_inline_cache_entry cache;
18015 struct iseq_inline_iv_cache_entry iv_cache;
18016};
18017
18018struct rb_calling_info {
18019 VALUE block_handler;
18020 VALUE recv;
18021 int argc;
18022 int kw_splat;
18023};
18024
18026
18027
18028
18029
18030
18031
18032typedef struct rb_iseq_location_struct {
18033 VALUE pathobj;
18034 VALUE base_label;
18035 VALUE label;
18036 VALUE first_lineno;
18037 int node_id;
18038 rb_code_location_t code_location;
18040
18041
18042static inline VALUE
18043pathobj_path(VALUE pathobj)
18044{
18045 if ((__builtin_constant_p(RUBY_T_STRING) ? rbimpl_RB_TYPE_P_fastpath((pathobj), (RUBY_T_STRING)) : (RB_TYPE_P)((pathobj), (RUBY_T_STRING)))) {
18046 return pathobj;
18047 }
18048 else {
18049 ((void)0);
18050 return RARRAY_AREF(pathobj, 0);
18051 }
18052}
18053
18054static inline VALUE
18055pathobj_realpath(VALUE pathobj)
18056{
18057 if ((__builtin_constant_p(RUBY_T_STRING) ? rbimpl_RB_TYPE_P_fastpath((pathobj), (RUBY_T_STRING)) : (RB_TYPE_P)((pathobj), (RUBY_T_STRING)))) {
18058 return pathobj;
18059 }
18060 else {
18061 ((void)0);
18062 return RARRAY_AREF(pathobj, 1);
18063 }
18064}
18065
18066
18067struct rb_mjit_unit;
18068
18069struct rb_iseq_constant_body {
18070 enum iseq_type {
18071 ISEQ_TYPE_TOP,
18072 ISEQ_TYPE_METHOD,
18073 ISEQ_TYPE_BLOCK,
18074 ISEQ_TYPE_CLASS,
18075 ISEQ_TYPE_RESCUE,
18076 ISEQ_TYPE_ENSURE,
18077 ISEQ_TYPE_EVAL,
18078 ISEQ_TYPE_MAIN,
18079 ISEQ_TYPE_PLAIN
18080 } type;
18081
18082 unsigned int iseq_size;
18083 VALUE *iseq_encoded;
18084 struct {
18085 struct {
18086 unsigned int has_lead : 1;
18087 unsigned int has_opt : 1;
18088 unsigned int has_rest : 1;
18089 unsigned int has_post : 1;
18090 unsigned int has_kw : 1;
18091 unsigned int has_kwrest : 1;
18092 unsigned int has_block : 1;
18093
18094 unsigned int ambiguous_param0 : 1;
18095 unsigned int accepts_no_kwarg : 1;
18096 unsigned int ruby2_keywords: 1;
18097 } flags;
18098
18099 unsigned int size;
18100
18101 int lead_num;
18102 int opt_num;
18103 int rest_start;
18104 int post_start;
18105 int post_num;
18106 int block_start;
18107
18108 const VALUE *opt_table;
18109 const struct rb_iseq_param_keyword {
18110 int num;
18111 int required_num;
18112 int bits_start;
18113 int rest_start;
18114 const ID *table;
18115 VALUE *default_values;
18116 } *keyword;
18117 } param;
18118
18119 rb_iseq_location_t location;
18120
18121
18122 struct iseq_insn_info {
18123 const struct iseq_insn_info_entry *body;
18124 unsigned int *positions;
18125 unsigned int size;
18126
18128
18129 } insns_info;
18130
18131 const ID *local_table;
18132
18133
18134 struct iseq_catch_table *catch_table;
18135
18136
18137 const struct rb_iseq_struct *parent_iseq;
18138 struct rb_iseq_struct *local_iseq;
18139
18140 union iseq_inline_storage_entry *is_entries;
18141 struct rb_call_data *call_data;
18142
18143 struct {
18144 rb_snum_t flip_count;
18145 VALUE coverage;
18146 VALUE pc2branchindex;
18147 VALUE *original_iseq;
18148 } variable;
18149
18150 unsigned int local_table_size;
18151 unsigned int is_size;
18152 unsigned int ci_size;
18153 unsigned int stack_max;
18154
18155 char catch_except_p;
18156 _Bool builtin_inline_p;
18157
18158
18159
18160 VALUE (*jit_func)(struct rb_execution_context_struct *,
18161 struct rb_control_frame_struct *);
18162 long unsigned total_calls;
18163 struct rb_mjit_unit *jit_unit;
18164
18165};
18166
18167
18168
18169struct rb_iseq_struct {
18170 VALUE flags;
18171 VALUE wrapper;
18172
18173 struct rb_iseq_constant_body *body;
18174
18175 union {
18176 struct iseq_compile_data *compile_data;
18177
18178 struct {
18179 VALUE obj;
18180 int index;
18181 } loader;
18182
18183 struct {
18184 struct rb_hook_list_struct *local_hooks;
18185 rb_event_flag_t global_trace_events;
18186 } exec;
18187 } aux;
18188};
18189
18190
18191
18192
18193
18194
18195
18196
18197static inline const rb_iseq_t *
18198rb_iseq_check(const rb_iseq_t *iseq)
18199{
18200
18201
18202
18203
18204
18205 return iseq;
18206}
18207
18208static inline const rb_iseq_t *
18209def_iseq_ptr(rb_method_definition_t *def)
18210{
18211
18212
18213
18214
18215 return rb_iseq_check(def->body.iseq.iseqptr);
18216}
18217
18218enum ruby_special_exceptions {
18219 ruby_error_reenter,
18220 ruby_error_nomemory,
18221 ruby_error_sysstack,
18222 ruby_error_stackfatal,
18223 ruby_error_stream_closed,
18224 ruby_special_error_count
18225};
18226
18227enum ruby_basic_operators {
18228 BOP_PLUS,
18229 BOP_MINUS,
18230 BOP_MULT,
18231 BOP_DIV,
18232 BOP_MOD,
18233 BOP_EQ,
18234 BOP_EQQ,
18235 BOP_LT,
18236 BOP_LE,
18237 BOP_LTLT,
18238 BOP_AREF,
18239 BOP_ASET,
18240 BOP_LENGTH,
18241 BOP_SIZE,
18242 BOP_EMPTY_P,
18243 BOP_NIL_P,
18244 BOP_SUCC,
18245 BOP_GT,
18246 BOP_GE,
18247 BOP_NOT,
18248 BOP_NEQ,
18249 BOP_MATCH,
18250 BOP_FREEZE,
18251 BOP_UMINUS,
18252 BOP_MAX,
18253 BOP_MIN,
18254 BOP_CALL,
18255 BOP_AND,
18256 BOP_OR,
18257
18258 BOP_LAST_
18259};
18260
18261
18262
18263struct rb_vm_struct;
18264typedef void rb_vm_at_exit_func(struct rb_vm_struct*);
18265
18266typedef struct rb_at_exit_list {
18267 rb_vm_at_exit_func *func;
18268 struct rb_at_exit_list *next;
18270
18271struct rb_objspace;
18272struct rb_objspace *rb_objspace_alloc(void);
18273void rb_objspace_free(struct rb_objspace *);
18274void rb_objspace_call_finalizer(struct rb_objspace *);
18275
18276typedef struct rb_hook_list_struct {
18277 struct rb_event_hook_struct *hooks;
18278 rb_event_flag_t events;
18279 unsigned int need_clean;
18280 unsigned int running;
18282
18283
18284
18285typedef const struct rb_builtin_function *RB_BUILTIN;
18286
18287typedef struct rb_vm_struct {
18288 VALUE self;
18289
18291
18292 struct rb_thread_struct *main_thread;
18293
18294
18295 const struct rb_thread_struct *running_thread;
18296
18297
18298 void *main_altstack;
18299
18300
18301 rb_serial_t fork_gen;
18302 rb_nativethread_lock_t waitpid_lock;
18303 struct list_head waiting_pids;
18304 struct list_head waiting_grps;
18305 struct list_head waiting_fds;
18306 struct list_head living_threads;
18307 VALUE thgroup_default;
18308 int living_thread_num;
18309
18310
18311 volatile int ubf_async_safe;
18312
18313 unsigned int running: 1;
18314 unsigned int thread_abort_on_exception: 1;
18315 unsigned int thread_report_on_exception: 1;
18316
18317 unsigned int safe_level_: 1;
18318 int sleeper;
18319
18320
18321 VALUE mark_object_ary;
18322 const VALUE special_exceptions[ruby_special_error_count];
18323
18324
18325 VALUE top_self;
18326 VALUE load_path;
18327 VALUE load_path_snapshot;
18328 VALUE load_path_check_cache;
18329 VALUE expanded_load_path;
18330 VALUE loaded_features;
18331 VALUE loaded_features_snapshot;
18332 struct st_table *loaded_features_index;
18333 struct st_table *loading_table;
18334
18335
18336 struct {
18337 VALUE cmd[(64 + 1)];
18338 } trap_list;
18339
18340
18341 rb_hook_list_t global_hooks;
18342
18343
18344 struct st_table *ensure_rollback_table;
18345
18346
18347 struct rb_postponed_job_struct *postponed_job_buffer;
18348 rb_atomic_t postponed_job_index;
18349
18350 int src_encoding_index;
18351
18352
18353 struct list_head workqueue;
18354 rb_nativethread_lock_t workqueue_lock;
18355
18356 VALUE verbose, debug, orig_progname, progname;
18357 VALUE coverages;
18358 int coverage_mode;
18359
18360 st_table * defined_module_hash;
18361
18362 struct rb_objspace *objspace;
18363
18364 rb_at_exit_list *at_exit;
18365
18366 VALUE *defined_strings;
18367 st_table *frozen_strings;
18368
18369 const struct rb_builtin_function *builtin_function_table;
18370 int builtin_inline_index;
18371
18372
18373 struct {
18374 size_t thread_vm_stack_size;
18375 size_t thread_machine_stack_size;
18376 size_t fiber_vm_stack_size;
18377 size_t fiber_machine_stack_size;
18378 } default_params;
18379
18380 short redefined_flag[BOP_LAST_];
18381} rb_vm_t;
18382
18383
18384
18385
18386
18387
18388
18389
18390
18391
18392
18393
18394
18395
18396
18397
18398
18399struct rb_captured_block {
18400 VALUE self;
18401 const VALUE *ep;
18402 union {
18403 const rb_iseq_t *iseq;
18404 const struct vm_ifunc *ifunc;
18405 VALUE val;
18406 } code;
18407};
18408
18409enum rb_block_handler_type {
18410 block_handler_type_iseq,
18411 block_handler_type_ifunc,
18412 block_handler_type_symbol,
18413 block_handler_type_proc
18414};
18415
18416enum rb_block_type {
18417 block_type_iseq,
18418 block_type_ifunc,
18419 block_type_symbol,
18420 block_type_proc
18421};
18422
18423struct rb_block {
18424 union {
18425 struct rb_captured_block captured;
18426 VALUE symbol;
18427 VALUE proc;
18428 } as;
18429 enum rb_block_type type;
18430};
18431
18432typedef struct rb_control_frame_struct {
18433 const VALUE *pc;
18434 VALUE *sp;
18435 const rb_iseq_t *iseq;
18436 VALUE self;
18437 const VALUE *ep;
18438 const void *block_code;
18439 VALUE *__bp__;
18440
18441
18442
18443
18445
18446extern const rb_data_type_t ruby_threadptr_data_type;
18447
18448static inline struct rb_thread_struct *
18449rb_thread_ptr(VALUE thval)
18450{
18451 return (struct rb_thread_struct *)rb_check_typeddata(thval, &ruby_threadptr_data_type);
18452}
18453
18454enum rb_thread_status {
18455 THREAD_RUNNABLE,
18456 THREAD_STOPPED,
18457 THREAD_STOPPED_FOREVER,
18458 THREAD_KILLED
18459};
18460
18461
18462
18463
18464typedef void *rb_jmpbuf_t[5];
18465
18466
18467
18468
18469
18470
18471struct rb_vm_tag {
18472 VALUE tag;
18473 VALUE retval;
18474 rb_jmpbuf_t buf;
18475 struct rb_vm_tag *prev;
18476 enum ruby_tag_type state;
18477};
18478
18479__extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (__builtin_offsetof(struct rb_vm_tag, buf) > 0) ? 2 : -1; })];
18480__extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (__builtin_offsetof(struct rb_vm_tag, buf) + sizeof(rb_jmpbuf_t) < sizeof(struct rb_vm_tag)) ? 2 : -1; })];
18481
18482
18483
18484struct rb_vm_protect_tag {
18485 struct rb_vm_protect_tag *prev;
18486};
18487
18488struct rb_unblock_callback {
18490 void *arg;
18491};
18492
18493struct rb_mutex_struct;
18494
18495typedef struct rb_thread_list_struct{
18496 struct rb_thread_list_struct *next;
18497 struct rb_thread_struct *th;
18499
18500typedef struct rb_ensure_entry {
18501 VALUE marker;
18502 VALUE (*e_proc)(VALUE);
18503 VALUE data2;
18505
18506typedef struct rb_ensure_list {
18507 struct rb_ensure_list *next;
18508 struct rb_ensure_entry entry;
18510
18511typedef char rb_thread_id_string_t[sizeof(rb_nativethread_id_t) * 2 + 3];
18512
18513typedef struct rb_fiber_struct rb_fiber_t;
18514
18516
18517 VALUE *vm_stack;
18518 size_t vm_stack_size;
18519 rb_control_frame_t *cfp;
18520
18521 struct rb_vm_tag *tag;
18522 struct rb_vm_protect_tag *protect_tag;
18523
18524
18525 rb_atomic_t interrupt_flag;
18526 rb_atomic_t interrupt_mask;
18527
18528 rb_fiber_t *fiber_ptr;
18529 struct rb_thread_struct *thread_ptr;
18530
18531
18532 struct rb_id_table *local_storage;
18533 VALUE local_storage_recursive_hash;
18534 VALUE local_storage_recursive_hash_for_trace;
18535
18536
18537 const VALUE *root_lep;
18538 VALUE root_svar;
18539
18540
18541 rb_ensure_list_t *ensure_list;
18542
18543
18544 struct rb_trace_arg_struct *trace_arg;
18545
18546
18547 VALUE errinfo;
18548 VALUE passed_block_handler;
18549
18550 uint8_t raised_flag;
18551
18552
18553 enum method_missing_reason method_missing_reason : 8;
18554
18555 VALUE private_const_reference;
18556
18557
18558 struct {
18559 VALUE *stack_start;
18560 VALUE *stack_end;
18561 size_t stack_maxsize;
18562 __declspec(align(8)) jmp_buf regs;
18563 } machine;
18564};
18565
18566
18568
18569
18570
18571
18572
18573void rb_ec_set_vm_stack(rb_execution_context_t *ec, VALUE *stack, size_t size);
18574
18575
18576
18577
18578
18579void rb_ec_initialize_vm_stack(rb_execution_context_t *ec, VALUE *stack, size_t size);
18580
18581
18582
18583void rb_ec_clear_vm_stack(rb_execution_context_t *ec);
18584
18585typedef struct rb_thread_struct {
18586 struct list_node vmlt_node;
18587 VALUE self;
18588 rb_vm_t *vm;
18589
18591
18592 VALUE last_status;
18593
18594
18595 struct rb_calling_info *calling;
18596
18597
18598 VALUE top_self;
18599 VALUE top_wrapper;
18600
18601
18602 rb_nativethread_id_t thread_id;
18603
18604
18605
18606 enum rb_thread_status status : 2;
18607
18608 unsigned int to_kill : 1;
18609 unsigned int abort_on_exception: 1;
18610 unsigned int report_on_exception: 1;
18611 unsigned int pending_interrupt_queue_checked: 1;
18612 int8_t priority;
18613 uint32_t running_time_us;
18614
18615 native_thread_data_t native_thread_data;
18616 void *blocking_region_buffer;
18617
18618 VALUE thgroup;
18619 VALUE value;
18620
18621
18622
18623
18624
18625
18626
18627 VALUE pending_interrupt_queue;
18628 VALUE pending_interrupt_mask_stack;
18629
18630
18631 rb_nativethread_lock_t interrupt_lock;
18632 struct rb_unblock_callback unblock;
18633 VALUE locking_mutex;
18634 struct rb_mutex_struct *keeping_mutexes;
18635
18636 rb_thread_list_t *join_list;
18637
18638 union {
18639 struct {
18640 VALUE proc;
18641 VALUE args;
18642 int kw_splat;
18643 } proc;
18644 struct {
18645 VALUE (*func)(void *);
18646 void *arg;
18647 } func;
18648 } invoke_arg;
18649
18650 enum {
18651 thread_invoke_type_none = 0,
18652 thread_invoke_type_proc,
18653 thread_invoke_type_func
18654 } invoke_type;
18655
18656
18657 VALUE stat_insn_usage;
18658
18659
18660 rb_fiber_t *root_fiber;
18661 rb_jmpbuf_t root_jmpbuf;
18662
18663 VALUE scheduler;
18664 unsigned blocking;
18665
18666
18667 VALUE name;
18668
18669
18670 void *altstack;
18671
18672} rb_thread_t;
18673
18674typedef enum {
18675 VM_DEFINECLASS_TYPE_CLASS = 0x00,
18676 VM_DEFINECLASS_TYPE_SINGLETON_CLASS = 0x01,
18677 VM_DEFINECLASS_TYPE_MODULE = 0x02,
18678
18679 VM_DEFINECLASS_TYPE_MASK = 0x07
18680} rb_vm_defineclass_type_t;
18681
18682
18683
18684
18685
18686
18687rb_iseq_t *rb_iseq_new (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent, enum iseq_type);
18688rb_iseq_t *rb_iseq_new_top (const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, const rb_iseq_t *parent);
18689rb_iseq_t *rb_iseq_new_main (const rb_ast_body_t *ast, VALUE path, VALUE realpath, const rb_iseq_t *parent);
18690rb_iseq_t *rb_iseq_new_with_opt(const rb_ast_body_t *ast, VALUE name, VALUE path, VALUE realpath, VALUE first_lineno,
18691 const rb_iseq_t *parent, enum iseq_type, const rb_compile_option_t*);
18692struct iseq_link_anchor;
18694 VALUE flags;
18695 VALUE reserved;
18696 void (*func)(rb_iseq_t *, struct iseq_link_anchor *, const void *);
18697 const void *data;
18698};
18699static inline struct rb_iseq_new_with_callback_callback_func *
18700rb_iseq_new_with_callback_new_callback(
18701 void (*func)(rb_iseq_t *, struct iseq_link_anchor *, const void *), const void *ptr)
18702{
18703 VALUE memo = rb_imemo_new(imemo_ifunc, (VALUE)func, (VALUE)ptr, ((VALUE)RUBY_Qundef), ((VALUE)RUBY_Qfalse));
18704 return (struct rb_iseq_new_with_callback_callback_func *)memo;
18705}
18706rb_iseq_t *rb_iseq_new_with_callback(const struct rb_iseq_new_with_callback_callback_func * ifunc,
18707 VALUE name, VALUE path, VALUE realpath, VALUE first_lineno,
18708 const rb_iseq_t *parent, enum iseq_type, const rb_compile_option_t*);
18709
18710VALUE rb_iseq_disasm(const rb_iseq_t *iseq);
18711int rb_iseq_disasm_insn(VALUE str, const VALUE *iseqval, size_t pos, const rb_iseq_t *iseq, VALUE child);
18712
18713VALUE rb_iseq_coverage(const rb_iseq_t *iseq);
18714
18715extern VALUE rb_cISeq;
18716extern VALUE rb_cRubyVM;
18717extern VALUE rb_mRubyVMFrozenCore;
18718extern VALUE rb_block_param_proxy;
18719
18720
18721
18722typedef struct {
18723 const struct rb_block block;
18724 unsigned int is_from_method: 1;
18725 unsigned int is_lambda: 1;
18726} rb_proc_t;
18727
18728typedef struct {
18729 VALUE flags;
18730 rb_iseq_t *iseq;
18731 const VALUE *ep;
18732 const VALUE *env;
18733 unsigned int env_size;
18734} rb_env_t;
18735
18736extern const rb_data_type_t ruby_binding_data_type;
18737
18738
18739
18740typedef struct {
18741 const struct rb_block block;
18742 const VALUE pathobj;
18743 unsigned short first_lineno;
18744} rb_binding_t;
18745
18746
18747
18748enum vm_check_match_type {
18749 VM_CHECKMATCH_TYPE_WHEN = 1,
18750 VM_CHECKMATCH_TYPE_CASE = 2,
18751 VM_CHECKMATCH_TYPE_RESCUE = 3
18752};
18753
18754
18755enum vm_special_object_type {
18756 VM_SPECIAL_OBJECT_VMCORE = 1,
18757 VM_SPECIAL_OBJECT_CBASE,
18758 VM_SPECIAL_OBJECT_CONST_BASE
18759};
18760
18761enum vm_svar_index {
18762 VM_SVAR_LASTLINE = 0,
18763 VM_SVAR_BACKREF = 1,
18764
18765 VM_SVAR_EXTRA_START = 2,
18766 VM_SVAR_FLIPFLOP_START = 2
18767};
18768
18769
18770typedef struct iseq_inline_cache_entry *IC;
18771typedef struct iseq_inline_iv_cache_entry *IVC;
18772typedef union iseq_inline_storage_entry *ISE;
18773typedef const struct rb_callinfo *CALL_INFO;
18774typedef const struct rb_callcache *CALL_CACHE;
18775typedef struct rb_call_data *CALL_DATA;
18776
18777typedef VALUE CDHASH;
18778
18779
18780
18781
18782typedef rb_control_frame_t *
18783 (*rb_insn_func_t)(rb_execution_context_t *, rb_control_frame_t *);
18784
18785
18786
18787enum {
18788 VM_FRAME_MAGIC_METHOD = 0x11110001,
18789 VM_FRAME_MAGIC_BLOCK = 0x22220001,
18790 VM_FRAME_MAGIC_CLASS = 0x33330001,
18791 VM_FRAME_MAGIC_TOP = 0x44440001,
18792 VM_FRAME_MAGIC_CFUNC = 0x55550001,
18793 VM_FRAME_MAGIC_IFUNC = 0x66660001,
18794 VM_FRAME_MAGIC_EVAL = 0x77770001,
18795 VM_FRAME_MAGIC_RESCUE = 0x78880001,
18796 VM_FRAME_MAGIC_DUMMY = 0x79990001,
18797
18798 VM_FRAME_MAGIC_MASK = 0x7fff0001,
18799
18800
18801 VM_FRAME_FLAG_PASSED = 0x0010,
18802 VM_FRAME_FLAG_FINISH = 0x0020,
18803 VM_FRAME_FLAG_BMETHOD = 0x0040,
18804 VM_FRAME_FLAG_CFRAME = 0x0080,
18805 VM_FRAME_FLAG_LAMBDA = 0x0100,
18806 VM_FRAME_FLAG_MODIFIED_BLOCK_PARAM = 0x0200,
18807 VM_FRAME_FLAG_CFRAME_KW = 0x0400,
18808
18809
18810 VM_ENV_FLAG_LOCAL = 0x0002,
18811 VM_ENV_FLAG_ESCAPED = 0x0004,
18812 VM_ENV_FLAG_WB_REQUIRED = 0x0008
18813};
18814
18815
18816
18817
18818static inline void VM_FORCE_WRITE_SPECIAL_CONST(const VALUE *ptr, VALUE special_const_value);
18819
18820static inline void
18821VM_ENV_FLAGS_SET(const VALUE *ep, VALUE flag)
18822{
18823 VALUE flags = ep[( 0)];
18824 ((void)0);
18825 VM_FORCE_WRITE_SPECIAL_CONST(&ep[( 0)], flags | flag);
18826}
18827
18828static inline void
18829VM_ENV_FLAGS_UNSET(const VALUE *ep, VALUE flag)
18830{
18831 VALUE flags = ep[( 0)];
18832 ((void)0);
18833 VM_FORCE_WRITE_SPECIAL_CONST(&ep[( 0)], flags & ~flag);
18834}
18835
18836static inline unsigned long
18837VM_ENV_FLAGS(const VALUE *ep, long flag)
18838{
18839 VALUE flags = ep[( 0)];
18840 ((void)0);
18841 return flags & flag;
18842}
18843
18844static inline unsigned long
18845VM_FRAME_TYPE(const rb_control_frame_t *cfp)
18846{
18847 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_MAGIC_MASK);
18848}
18849
18850static inline int
18851VM_FRAME_LAMBDA_P(const rb_control_frame_t *cfp)
18852{
18853 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_LAMBDA) != 0;
18854}
18855
18856static inline int
18857VM_FRAME_CFRAME_KW_P(const rb_control_frame_t *cfp)
18858{
18859 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_CFRAME_KW) != 0;
18860}
18861
18862static inline int
18863VM_FRAME_FINISHED_P(const rb_control_frame_t *cfp)
18864{
18865 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_FINISH) != 0;
18866}
18867
18868static inline int
18869VM_FRAME_BMETHOD_P(const rb_control_frame_t *cfp)
18870{
18871 return VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_BMETHOD) != 0;
18872}
18873
18874static inline int
18875rb_obj_is_iseq(VALUE iseq)
18876{
18877 return imemo_type_p(iseq, imemo_iseq);
18878}
18879
18880
18881
18882
18883
18884static inline int
18885VM_FRAME_CFRAME_P(const rb_control_frame_t *cfp)
18886{
18887 int cframe_p = VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_CFRAME) != 0;
18888 ((void)0);
18889 return cframe_p;
18890}
18891
18892static inline int
18893VM_FRAME_RUBYFRAME_P(const rb_control_frame_t *cfp)
18894{
18895 return !VM_FRAME_CFRAME_P(cfp);
18896}
18897
18898
18899
18900
18901static inline int
18902VM_ENV_LOCAL_P(const VALUE *ep)
18903{
18904 return VM_ENV_FLAGS(ep, VM_ENV_FLAG_LOCAL) ? 1 : 0;
18905}
18906
18907static inline const VALUE *
18908VM_ENV_PREV_EP(const VALUE *ep)
18909{
18910 ((void)0);
18911 return ((void *)(((ep[(-1)])) & ~0x03));
18912}
18913
18914static inline VALUE
18915VM_ENV_BLOCK_HANDLER(const VALUE *ep)
18916{
18917 ((void)0);
18918 return ep[(-1)];
18919}
18920
18921
18922
18923
18924
18925static inline int
18926VM_ENV_ESCAPED_P(const VALUE *ep)
18927{
18928 ((void)0);
18929 return VM_ENV_FLAGS(ep, VM_ENV_FLAG_ESCAPED) ? 1 : 0;
18930}
18931static inline VALUE
18932VM_ENV_ENVVAL(const VALUE *ep)
18933{
18934 VALUE envval = ep[( 1)];
18935 ((void)0);
18936 ((void)0);
18937 return envval;
18938}
18939
18940static inline const rb_env_t *
18941VM_ENV_ENVVAL_PTR(const VALUE *ep)
18942{
18943 return (const rb_env_t *)VM_ENV_ENVVAL(ep);
18944}
18945
18946static inline const rb_env_t *
18947vm_env_new(VALUE *env_ep, VALUE *env_body, unsigned int env_size, const rb_iseq_t *iseq)
18948{
18949 rb_env_t *env = (rb_env_t *)rb_imemo_new(imemo_env, (VALUE)env_ep, (VALUE)env_body, 0, (VALUE)iseq);
18950 env->env_size = env_size;
18951 env_ep[( 1)] = (VALUE)env;
18952 return env;
18953}
18954
18955static inline void
18956VM_FORCE_WRITE(const VALUE *ptr, VALUE v)
18957{
18958 *((VALUE *)ptr) = v;
18959}
18960
18961static inline void
18962VM_FORCE_WRITE_SPECIAL_CONST(const VALUE *ptr, VALUE special_const_value)
18963{
18964 ((void)0);
18965 VM_FORCE_WRITE(ptr, special_const_value);
18966}
18967
18968static inline void
18969VM_STACK_ENV_WRITE(const VALUE *ep, int index, VALUE v)
18970{
18971 ((void)0);
18972 VM_FORCE_WRITE(&ep[index], v);
18973}static inline
18974
18975const VALUE *rb_vm_ep_local_ep(const VALUE *ep);
18976const VALUE *rb_vm_proc_local_ep(VALUE proc);static inline
18977void rb_vm_block_ep_update(VALUE obj, const struct rb_block *dst, const VALUE *ep);
18978void rb_vm_block_copy(VALUE obj, const struct rb_block *dst, const struct rb_block *src);static inline
18979
18980VALUE rb_vm_frame_block_handler(const rb_control_frame_t *cfp);
18981
18982
18983
18984
18985static inline const rb_control_frame_t *
18986RUBY_VM_END_CONTROL_FRAME(const rb_execution_context_t *ec)
18987{
18988 return (rb_control_frame_t *)(ec->vm_stack + ec->vm_stack_size);
18989}
18990
18991static inline int
18992RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
18993{
18994 return !((void *)(RUBY_VM_END_CONTROL_FRAME(ec)) > (void *)(cfp));
18995}
18996
18997static inline int
18998VM_BH_ISEQ_BLOCK_P(VALUE block_handler)
18999{
19000 if ((block_handler & 0x03) == 0x01) {
19001
19002
19003
19004
19005 return 1;
19006 }
19007 else {
19008 return 0;
19009 }
19010}
19011
19012static inline VALUE
19013VM_BH_FROM_ISEQ_BLOCK(const struct rb_captured_block *captured)
19014{
19015 VALUE block_handler = ((VALUE)(captured) | (0x01));
19016 ((void)0);
19017 return block_handler;
19018}
19019
19020static inline const struct rb_captured_block *
19021VM_BH_TO_ISEQ_BLOCK(VALUE block_handler)
19022{
19023 struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03));
19024 ((void)0);
19025 return captured;
19026}
19027
19028static inline int
19029VM_BH_IFUNC_P(VALUE block_handler)
19030{
19031 if ((block_handler & 0x03) == 0x03) {
19032
19033
19034
19035
19036 return 1;
19037 }
19038 else {
19039 return 0;
19040 }
19041}
19042
19043static inline VALUE
19044VM_BH_FROM_IFUNC_BLOCK(const struct rb_captured_block *captured)
19045{
19046 VALUE block_handler = ((VALUE)(captured) | (0x03));
19047 ((void)0);
19048 return block_handler;
19049}
19050
19051static inline const struct rb_captured_block *
19052VM_BH_TO_IFUNC_BLOCK(VALUE block_handler)
19053{
19054 struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03));
19055 ((void)0);
19056 return captured;
19057}
19058
19059static inline const struct rb_captured_block *
19060VM_BH_TO_CAPT_BLOCK(VALUE block_handler)
19061{
19062 struct rb_captured_block *captured = ((void *)((block_handler) & ~0x03));
19063 ((void)0);
19064 return captured;
19065}
19066
19067static inline enum rb_block_handler_type
19068vm_block_handler_type(VALUE block_handler)
19069{
19070 if (VM_BH_ISEQ_BLOCK_P(block_handler)) {
19071 return block_handler_type_iseq;
19072 }
19073 else if (VM_BH_IFUNC_P(block_handler)) {
19074 return block_handler_type_ifunc;
19075 }
19076 else if (RB_SYMBOL_P(block_handler)) {
19077 return block_handler_type_symbol;
19078 }
19079 else {
19080 ((void)0);
19081 return block_handler_type_proc;
19082 }
19083}
19084
19085static inline void
19086vm_block_handler_verify(__attribute__ ((__unused__)) VALUE block_handler)
19087{
19088 ((void)0);
19089
19090}
19091
19092static inline int
19093vm_cfp_forwarded_bh_p(const rb_control_frame_t *cfp, VALUE block_handler)
19094{
19095 return ((VALUE) cfp->block_code) == block_handler;
19096}
19097
19098static inline enum rb_block_type
19099vm_block_type(const struct rb_block *block)
19100{
19101 return block->type;
19102}
19103
19104static inline void
19105vm_block_type_set(const struct rb_block *block, enum rb_block_type type)
19106{
19107 struct rb_block *mb = (struct rb_block *)block;
19108 mb->type = type;
19109}
19110
19111static inline const struct rb_block *
19112vm_proc_block(VALUE procval)
19113{
19114 ((void)0);
19115 return &((rb_proc_t *)(((struct RTypedData *)(procval))->data))->block;
19116}
19117
19118static inline const rb_iseq_t *vm_block_iseq(const struct rb_block *block);
19119static inline const VALUE *vm_block_ep(const struct rb_block *block);
19120
19121static inline const rb_iseq_t *
19122vm_proc_iseq(VALUE procval)
19123{
19124 return vm_block_iseq(vm_proc_block(procval));
19125}
19126
19127static inline const VALUE *
19128vm_proc_ep(VALUE procval)
19129{
19130 return vm_block_ep(vm_proc_block(procval));
19131}
19132
19133static inline const rb_iseq_t *
19134vm_block_iseq(const struct rb_block *block)
19135{
19136 switch (vm_block_type(block)) {
19137 case block_type_iseq: return rb_iseq_check(block->as.captured.code.iseq);
19138 case block_type_proc: return vm_proc_iseq(block->as.proc);
19139 case block_type_ifunc:
19140 case block_type_symbol: return ((void*)0);
19141 }
19142 __builtin_unreachable();
19143 return ((void*)0);
19144}
19145
19146static inline const VALUE *
19147vm_block_ep(const struct rb_block *block)
19148{
19149 switch (vm_block_type(block)) {
19150 case block_type_iseq:
19151 case block_type_ifunc: return block->as.captured.ep;
19152 case block_type_proc: return vm_proc_ep(block->as.proc);
19153 case block_type_symbol: return ((void*)0);
19154 }
19155 __builtin_unreachable();
19156 return ((void*)0);
19157}
19158
19159static inline VALUE
19160vm_block_self(const struct rb_block *block)
19161{
19162 switch (vm_block_type(block)) {
19163 case block_type_iseq:
19164 case block_type_ifunc:
19165 return block->as.captured.self;
19166 case block_type_proc:
19167 return vm_block_self(vm_proc_block(block->as.proc));
19168 case block_type_symbol:
19169 return ((VALUE)RUBY_Qundef);
19170 }
19171 __builtin_unreachable();
19172 return ((VALUE)RUBY_Qundef);
19173}
19174
19175static inline VALUE
19176VM_BH_TO_SYMBOL(VALUE block_handler)
19177{
19178 ((void)0);
19179 return block_handler;
19180}
19181
19182static inline VALUE
19183VM_BH_FROM_SYMBOL(VALUE symbol)
19184{
19185 ((void)0);
19186 return symbol;
19187}
19188
19189static inline VALUE
19190VM_BH_TO_PROC(VALUE block_handler)
19191{
19192 ((void)0);
19193 return block_handler;
19194}
19195
19196static inline VALUE
19197VM_BH_FROM_PROC(VALUE procval)
19198{
19199 ((void)0);
19200 return procval;
19201}
19202
19203
19204VALUE rb_thread_alloc(VALUE klass);
19205VALUE rb_binding_alloc(VALUE klass);
19206VALUE rb_proc_alloc(VALUE klass);
19207VALUE rb_proc_dup(VALUE self);
19208
19209
19210extern void rb_vmdebug_stack_dump_raw(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
19211extern void rb_vmdebug_debug_print_pre(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE *_pc);
19212extern void rb_vmdebug_debug_print_post(const rb_execution_context_t *ec, const rb_control_frame_t *cfp
19213
19214
19215
19216);
19217
19218void rb_vm_bugreport(const void *);
19219typedef void (*ruby_sighandler_t)(int);
19220__declspec(noreturn) void rb_bug_for_fatal_signal(ruby_sighandler_t default_sighandler, int sig, const void *, const char *fmt, ...);
19221
19222
19223VALUE rb_iseq_eval(const rb_iseq_t *iseq);
19224VALUE rb_iseq_eval_main(const rb_iseq_t *iseq);
19225VALUE rb_iseq_path(const rb_iseq_t *iseq);
19226VALUE rb_iseq_realpath(const rb_iseq_t *iseq);
19227
19228VALUE rb_iseq_pathobj_new(VALUE path, VALUE realpath);
19229void rb_iseq_pathobj_set(const rb_iseq_t *iseq, VALUE path, VALUE realpath);
19230
19231int rb_ec_frame_method_id_and_class(const rb_execution_context_t *ec, ID *idp, ID *called_idp, VALUE *klassp);
19232void rb_ec_setup_exception(const rb_execution_context_t *ec, VALUE mesg, VALUE cause);
19233
19234VALUE rb_vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, int argc, const VALUE *argv, int kw_splat, VALUE block_handler);
19235
19236VALUE rb_vm_make_proc_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass, int8_t is_lambda);
19237static inline VALUE
19238rb_vm_make_proc(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass)
19239{
19240 return rb_vm_make_proc_lambda(ec, captured, klass, 0);
19241}
19242
19243static inline VALUE
19244rb_vm_make_lambda(const rb_execution_context_t *ec, const struct rb_captured_block *captured, VALUE klass)
19245{
19246 return rb_vm_make_proc_lambda(ec, captured, klass, 1);
19247}
19248
19249VALUE rb_vm_make_binding(const rb_execution_context_t *ec, const rb_control_frame_t *src_cfp);
19250VALUE rb_vm_env_local_variables(const rb_env_t *env);
19251const rb_env_t *rb_vm_env_prev_env(const rb_env_t *env);
19252const VALUE *rb_binding_add_dynavars(VALUE bindval, rb_binding_t *bind, int dyncount, const ID *dynvars);
19253void rb_vm_inc_const_missing_count(void);
19254void rb_vm_gvl_destroy(rb_vm_t *vm);
19255VALUE rb_vm_call_kw(rb_execution_context_t *ec, VALUE recv, VALUE id, int argc,
19256 const VALUE *argv, const rb_callable_method_entry_t *me, int kw_splat);
19257static void rb_vm_pop_frame(rb_execution_context_t *ec);
19258
19259void rb_thread_start_timer_thread(void);
19260void rb_thread_stop_timer_thread(void);
19261void rb_thread_reset_timer_thread(void);
19262void rb_thread_wakeup_timer_thread(int);
19263
19264static inline void
19265rb_vm_living_threads_init(rb_vm_t *vm)
19266{
19267 list_head_init(&vm->waiting_fds);
19268 list_head_init(&vm->waiting_pids);
19269 list_head_init(&vm->workqueue);
19270 list_head_init(&vm->waiting_grps);
19271 list_head_init(&vm->living_threads);
19272 vm->living_thread_num = 0;
19273}
19274
19275static inline void
19276rb_vm_living_threads_insert(rb_vm_t *vm, rb_thread_t *th)
19277{
19278 list_add_tail_(&vm->living_threads, &th->vmlt_node, "./vm_core.h" ":" "1655");
19279 vm->living_thread_num++;
19280}
19281
19282static inline void
19283rb_vm_living_threads_remove(rb_vm_t *vm, rb_thread_t *th)
19284{
19285 list_del_(&th->vmlt_node, "./vm_core.h" ":" "1662");
19286 vm->living_thread_num--;
19287}
19288
19289typedef int rb_backtrace_iter_func(void *, VALUE, int, VALUE);
19290rb_control_frame_t *rb_vm_get_ruby_level_next_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
19291rb_control_frame_t *rb_vm_get_binding_creatable_next_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
19292int rb_vm_get_sourceline(const rb_control_frame_t *);
19293void rb_vm_stack_to_heap(rb_execution_context_t *ec);
19294void ruby_thread_init_stack(rb_thread_t *th);
19295int rb_vm_control_frame_id_and_class(const rb_control_frame_t *cfp, ID *idp, ID *called_idp, VALUE *klassp);
19296void rb_vm_rewind_cfp(rb_execution_context_t *ec, rb_control_frame_t *cfp);
19297static VALUE rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler);
19298
19299void rb_vm_register_special_exception_str(enum ruby_special_exceptions sp, VALUE exception_class, VALUE mesg);
19300
19301
19302
19303void rb_gc_mark_machine_stack(const rb_execution_context_t *ec);static inline
19304
19305void rb_vm_rewrite_cref(rb_cref_t *node, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr);
19306
19307static const rb_callable_method_entry_t *rb_vm_frame_method_entry(const rb_control_frame_t *cfp);
19308
19309
19310
19311
19312VALUE rb_catch_protect(VALUE t, rb_block_call_func *func, VALUE data, enum ruby_tag_type *stateptr);
19313
19314
19315
19316
19317
19318extern rb_vm_t *ruby_current_vm_ptr;
19319extern rb_execution_context_t *ruby_current_execution_context_ptr;
19320extern rb_event_flag_t ruby_vm_event_flags;
19321extern rb_event_flag_t ruby_vm_event_enabled_global_flags;
19322extern unsigned int ruby_vm_event_local_num;
19323
19324
19325
19326static inline rb_thread_t *
19327rb_ec_thread_ptr(const rb_execution_context_t *ec)
19328{
19329 return ec->thread_ptr;
19330}
19331
19332static inline rb_vm_t *
19333rb_ec_vm_ptr(const rb_execution_context_t *ec)
19334{
19335 const rb_thread_t *th = rb_ec_thread_ptr(ec);
19336 if (th) {
19337 return th->vm;
19338 }
19339 else {
19340 return ((void*)0);
19341 }
19342}
19343
19344static inline rb_execution_context_t *
19345rb_current_execution_context(void)
19346{
19347 return ruby_current_execution_context_ptr;
19348}
19349
19350static inline rb_thread_t *
19351rb_current_thread(void)
19352{
19353 const rb_execution_context_t *ec = rb_current_execution_context();
19354 return rb_ec_thread_ptr(ec);
19355}
19356
19357static inline rb_vm_t *
19358rb_current_vm(void)
19359{
19360 ((void)0);
19361
19362
19363
19364
19365 return ruby_current_vm_ptr;
19366}
19367
19368static inline void
19369rb_thread_set_current_raw(const rb_thread_t *th)
19370{
19371 ruby_current_execution_context_ptr = th->ec;
19372}
19373
19374static inline void
19375rb_thread_set_current(rb_thread_t *th)
19376{
19377 if (th->vm->running_thread != th) {
19378 th->running_time_us = 0;
19379 }
19380 rb_thread_set_current_raw(th);
19381 th->vm->running_thread = th;
19382}
19383
19384
19385
19386
19387
19388enum {
19389 TIMER_INTERRUPT_MASK = 0x01,
19390 PENDING_INTERRUPT_MASK = 0x02,
19391 POSTPONED_JOB_INTERRUPT_MASK = 0x04,
19392 TRAP_INTERRUPT_MASK = 0x08
19393};
19394
19395
19396
19397VALUE rb_exc_set_backtrace(VALUE exc, VALUE bt);
19398int rb_signal_buff_size(void);
19399int rb_signal_exec(rb_thread_t *th, int sig);
19400void rb_threadptr_check_signal(rb_thread_t *mth);
19401void rb_threadptr_signal_raise(rb_thread_t *th, int sig);
19402void rb_threadptr_signal_exit(rb_thread_t *th);
19403int rb_threadptr_execute_interrupts(rb_thread_t *, int);
19404void rb_threadptr_interrupt(rb_thread_t *th);
19405void rb_threadptr_unlock_all_locking_mutexes(rb_thread_t *th);
19406void rb_threadptr_pending_interrupt_clear(rb_thread_t *th);
19407void rb_threadptr_pending_interrupt_enque(rb_thread_t *th, VALUE v);
19408VALUE rb_ec_get_errinfo(const rb_execution_context_t *ec);
19409void rb_ec_error_print(rb_execution_context_t * volatile ec, volatile VALUE errinfo);
19410void rb_execution_context_update(const rb_execution_context_t *ec);
19411void rb_execution_context_mark(const rb_execution_context_t *ec);
19412void rb_fiber_close(rb_fiber_t *fib);
19413void Init_native_thread(rb_thread_t *th);
19414
19415static inline void
19416rb_vm_check_ints(rb_execution_context_t *ec)
19417{
19418 ((void)0);
19419 if ((__builtin_expect(!!(((ec)->interrupt_flag & ~(ec)->interrupt_mask)), 0))) {
19420 rb_threadptr_execute_interrupts(rb_ec_thread_ptr(ec), 0);
19421 }
19422}
19423
19424
19425
19426struct rb_trace_arg_struct {
19427 rb_event_flag_t event;
19429 const rb_control_frame_t *cfp;
19430 VALUE self;
19431 ID id;
19432 ID called_id;
19433 VALUE klass;
19434 VALUE data;
19435
19436 int klass_solved;
19437
19438
19439 int lineno;
19440 VALUE path;
19441};
19442
19443void rb_hook_list_mark(rb_hook_list_t *hooks);
19444void rb_hook_list_free(rb_hook_list_t *hooks);
19445void rb_hook_list_connect_tracepoint(VALUE target, rb_hook_list_t *list, VALUE tpval, unsigned int target_line);
19446void rb_hook_list_remove_tracepoint(rb_hook_list_t *list, VALUE tpval);
19447
19448void rb_exec_event_hooks(struct rb_trace_arg_struct *trace_arg, rb_hook_list_t *hooks, int pop_p);
19449
19450
19451
19452
19453
19454
19455
19456
19457
19458static inline void
19459rb_exec_event_hook_orig(rb_execution_context_t *ec, rb_hook_list_t *hooks, rb_event_flag_t flag,
19460 VALUE self, ID id, ID called_id, VALUE klass, VALUE data, int pop_p)
19461{
19462 struct rb_trace_arg_struct trace_arg;
19463
19464 ((void)0);
19465
19466 trace_arg.event = flag;
19467 trace_arg.ec = ec;
19468 trace_arg.cfp = ec->cfp;
19469 trace_arg.self = self;
19470 trace_arg.id = id;
19471 trace_arg.called_id = called_id;
19472 trace_arg.klass = klass;
19473 trace_arg.data = data;
19474 trace_arg.path = ((VALUE)RUBY_Qundef);
19475 trace_arg.klass_solved = 0;
19476
19477 rb_exec_event_hooks(&trace_arg, hooks, pop_p);
19478}
19479
19480static inline rb_hook_list_t *
19481rb_vm_global_hooks(const rb_execution_context_t *ec)
19482{
19483 return &rb_ec_vm_ptr(ec)->global_hooks;
19484}
19485
19486
19487
19488
19489
19490static inline void
19491rb_exec_event_hook_script_compiled(rb_execution_context_t *ec, const rb_iseq_t *iseq, VALUE eval_script)
19492{
19493 do { const rb_event_flag_t flag_arg_ = (0x2000); rb_hook_list_t *hooks_arg_ = (rb_vm_global_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, ec->cfp->self, 0, 0, 0, RB_NIL_P(eval_script) ? (VALUE)iseq : rb_ary_new_from_args(2, eval_script, (VALUE)iseq), 0); } } while (0);
19494
19495
19496}
19497
19498void rb_vm_trap_exit(rb_vm_t *vm);
19499
19500
19501int rb_thread_check_trap_pending(void);
19502
19503
19504
19505extern VALUE rb_get_coverages(void);
19506extern void rb_set_coverages(VALUE, int, VALUE);
19507extern void rb_clear_coverages(void);
19508extern void rb_reset_coverages(void);
19509
19510void rb_postponed_job_flush(rb_vm_t *vm);
19511
19512
19513static inline void
19514vm_passed_block_handler_set(rb_execution_context_t *ec, VALUE block_handler)
19515{
19516 vm_block_handler_verify(block_handler);
19517 ec->passed_block_handler = block_handler;
19518}
19519
19520static inline void
19521pass_passed_block_handler(rb_execution_context_t *ec)
19522{
19523 VALUE block_handler = rb_vm_frame_block_handler(ec->cfp);
19524 vm_passed_block_handler_set(ec, block_handler);
19525 VM_ENV_FLAGS_SET(ec->cfp->ep, VM_FRAME_FLAG_PASSED);
19526}
19527
19528
19529
19530
19531
19532
19533
19534
19535
19536
19537
19538
19539
19540
19541
19542
19543
19544
19545
19546
19547
19548
19549
19550
19551
19552
19553
19554
19555
19556
19557
19558
19559
19560
19561
19562
19563
19564
19565
19566extern int *__errno_location (void) __attribute__ ((__nothrow__ )) __attribute__ ((__const__));
19567
19568
19569
19570
19571
19572
19573extern char *program_invocation_name;
19574extern char *program_invocation_short_name;
19575
19576
19577
19578typedef int error_t;
19579
19580
19581
19582
19583
19584
19585
19586
19587
19588
19589
19590
19591
19592
19593
19594
19595
19596
19597
19598
19599
19600
19601
19602
19603
19604
19605
19606
19607
19608
19609
19610
19611
19612
19613
19614
19615
19616
19617
19618
19619
19620
19621
19622
19623
19624
19625
19626
19627
19628
19629
19630
19631
19632
19633
19634
19635
19636
19637
19638
19639
19640
19641
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666
19667
19668
19669
19670
19671
19672
19673
19674
19675
19676
19677
19678
19679
19680
19681
19682
19683
19684
19685
19686
19687
19688
19689
19690
19691static inline int
19692rb_ec_tag_state(const rb_execution_context_t *ec)
19693{
19694 enum ruby_tag_type state = ec->tag->state;
19695 ec->tag->state = RUBY_TAG_NONE;
19696 return state;
19697}
19698
19699__declspec(noreturn) static inline void rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st);
19700static inline void
19701rb_ec_tag_jump(const rb_execution_context_t *ec, enum ruby_tag_type st)
19702{
19703 ec->tag->state = st;
19704 __builtin_longjmp((void **)((ec->tag->buf)),(1));
19705}
19706
19707
19708
19709
19710
19711
19712
19713
19714
19715
19716
19717
19718static inline VALUE
19719CREF_CLASS(const rb_cref_t *cref)
19720{
19721 return cref->klass;
19722}
19723
19724static inline rb_cref_t *
19725CREF_NEXT(const rb_cref_t *cref)
19726{
19727 return cref->next;
19728}
19729
19730static inline const rb_scope_visibility_t *
19731CREF_SCOPE_VISI(const rb_cref_t *cref)
19732{
19733 return &cref->scope_visi;
19734}
19735
19736static inline VALUE
19737CREF_REFINEMENTS(const rb_cref_t *cref)
19738{
19739 return cref->refinements;
19740}
19741
19742static inline void
19743CREF_REFINEMENTS_SET(rb_cref_t *cref, VALUE refs)
19744{
19745 __extension__({
19746;
19747; __typeof__(rb_obj_write((VALUE)(cref), (VALUE *)(&cref->refinements), (VALUE)(refs), "./eval_intern.h", 220)) unaligned_member_access_result = (rb_obj_write((VALUE)(cref), (VALUE *)(&cref->refinements), (VALUE)(refs), "./eval_intern.h", 220));
19748; unaligned_member_access_result; });
19749}
19750
19751static inline int
19752CREF_PUSHED_BY_EVAL(const rb_cref_t *cref)
19753{
19754 return cref->flags & ((VALUE)RUBY_FL_USER5);
19755}
19756
19757static inline void
19758CREF_PUSHED_BY_EVAL_SET(rb_cref_t *cref)
19759{
19760 cref->flags |= ((VALUE)RUBY_FL_USER5);
19761}
19762
19763static inline int
19764CREF_OMOD_SHARED(const rb_cref_t *cref)
19765{
19766 return cref->flags & ((VALUE)RUBY_FL_USER6);
19767}
19768
19769static inline void
19770CREF_OMOD_SHARED_SET(rb_cref_t *cref)
19771{
19772 cref->flags |= ((VALUE)RUBY_FL_USER6);
19773}
19774
19775static inline void
19776CREF_OMOD_SHARED_UNSET(rb_cref_t *cref)
19777{
19778 cref->flags &= ~((VALUE)RUBY_FL_USER6);
19779}
19780
19781enum {
19782 RAISED_EXCEPTION = 1,
19783 RAISED_STACKOVERFLOW = 2,
19784 RAISED_NOMEMORY = 4
19785};
19786int rb_ec_set_raised(rb_execution_context_t *ec);
19787int rb_ec_reset_raised(rb_execution_context_t *ec);
19788int rb_ec_stack_check(rb_execution_context_t *ec);
19789
19790VALUE rb_f_eval(int argc, const VALUE *argv, VALUE self);
19791VALUE rb_make_exception(int argc, const VALUE *argv);
19792
19793__declspec(noreturn) void rb_method_name_error(VALUE, VALUE);
19794
19795__declspec(noreturn) void rb_fiber_start(void);
19796
19797__declspec(noreturn) void rb_print_undef(VALUE, ID, rb_method_visibility_t);
19798__declspec(noreturn) void rb_print_undef_str(VALUE, VALUE);
19799__declspec(noreturn) void rb_print_inaccessible(VALUE, ID, rb_method_visibility_t);
19800__declspec(noreturn) void rb_vm_localjump_error(const char *,VALUE, int);
19801__declspec(noreturn) void rb_vm_jump_tag_but_local_jump(int);
19802
19803VALUE rb_vm_make_jump_tag_but_local_jump(int state, VALUE val);
19804rb_cref_t *rb_vm_cref(void);
19805rb_cref_t *rb_vm_cref_replace_with_duplicated_cref(void);
19806VALUE rb_vm_call_cfunc(VALUE recv, VALUE (*func)(VALUE), VALUE arg, VALUE block_handler, VALUE filename);
19807void rb_vm_set_progname(VALUE filename);
19808void rb_thread_terminate_all(void);
19809VALUE rb_vm_cbase(void);
19810
19811
19812VALUE rb_ec_backtrace_object(const rb_execution_context_t *ec);
19813VALUE rb_ec_backtrace_str_ary(const rb_execution_context_t *ec, long lev, long n);
19814VALUE rb_ec_backtrace_location_ary(const rb_execution_context_t *ec, long lev, long n);
19815
19816
19817
19818
19819
19820
19821
19822
19823
19824
19825
19826
19827
19828
19829
19830
19831
19832
19833
19834
19835
19836
19837
19838
19839const char *rb_obj_info(VALUE obj);
19840const char *rb_raw_obj_info(char *buff, const int buff_size, VALUE obj);
19841
19842VALUE rb_gc_disable_no_rest(void);
19843
19844struct rb_thread_struct;
19845
19846
19847
19848size_t rb_objspace_data_type_memsize(VALUE obj);
19849void rb_objspace_reachable_objects_from(VALUE obj, void (func)(VALUE, void *), void *data);
19850void rb_objspace_reachable_objects_from_root(void (func)(const char *category, VALUE, void *), void *data);
19851int rb_objspace_markable_object_p(VALUE obj);
19852int rb_objspace_internal_object_p(VALUE obj);
19853int rb_objspace_marked_object_p(VALUE obj);
19854int rb_objspace_garbage_object_p(VALUE obj);
19855
19856void rb_objspace_each_objects(
19857 int (*callback)(void *start, void *end, size_t stride, void *data),
19858 void *data);
19859
19860void rb_objspace_each_objects_without_setup(
19861 int (*callback)(void *, void *, size_t, void *),
19862 void *data);
19863
19864
19865
19866
19867
19868struct rb_iseq_struct;
19869
19870
19871int rb_dvar_defined(ID, const struct rb_iseq_struct *);
19872int rb_local_defined(ID, const struct rb_iseq_struct *);
19873const char *rb_insns_name(int i);
19874VALUE rb_insns_name_array(void);
19875
19876
19877int rb_vm_insn_addr2insn(const void *);
19878
19879
19880rb_event_flag_t rb_iseq_event_flags(const struct rb_iseq_struct *iseq, size_t pos);
19881
19882struct rb_thread_struct;
19883struct rb_fiber_struct;
19884
19885
19886VALUE rb_obj_is_fiber(VALUE);
19887void rb_fiber_reset_root_local_storage(struct rb_thread_struct *);
19888void ruby_register_rollback_func_for_ensure(VALUE (*ensure_func)(VALUE), VALUE (*rollback_func)(VALUE));
19889void rb_fiber_init_mjit_cont(struct rb_fiber_struct *fiber);
19890
19891
19892
19893
19894
19895
19896
19897
19898
19899
19900
19901
19902
19903
19904
19905
19906
19907
19908
19909typedef unsigned char OnigUChar;
19910typedef unsigned int OnigCodePoint;
19911typedef unsigned int OnigCtype;
19912typedef size_t OnigDistance;
19913typedef ptrdiff_t OnigPosition;
19914
19915typedef unsigned int OnigCaseFoldType;
19916
19917extern OnigCaseFoldType OnigDefaultCaseFoldFlag;
19918
19919
19920
19921
19922
19923
19924
19925
19926
19927
19928
19929
19930
19931
19932
19933
19934
19935
19936
19937typedef struct {
19938 int byte_len;
19939 int code_len;
19940 OnigCodePoint code[3];
19942
19943typedef struct {
19944 OnigCodePoint esc;
19945 OnigCodePoint anychar;
19946 OnigCodePoint anytime;
19947 OnigCodePoint zero_or_one_time;
19948 OnigCodePoint one_or_more_time;
19949 OnigCodePoint anychar_anytime;
19951
19952typedef int (*OnigApplyAllCaseFoldFunc)(OnigCodePoint from, OnigCodePoint* to, int to_len, void* arg);
19953
19954typedef struct OnigEncodingTypeST {
19955 int (*precise_mbc_enc_len)(const OnigUChar* p,const OnigUChar* e, const struct OnigEncodingTypeST* enc);
19956 const char* name;
19957 int max_enc_len;
19958 int min_enc_len;
19959 int (*is_mbc_newline)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc);
19960 OnigCodePoint (*mbc_to_code)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc);
19961 int (*code_to_mbclen)(OnigCodePoint code, const struct OnigEncodingTypeST* enc);
19962 int (*code_to_mbc)(OnigCodePoint code, OnigUChar *buf, const struct OnigEncodingTypeST* enc);
19963 int (*mbc_case_fold)(OnigCaseFoldType flag, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, const struct OnigEncodingTypeST* enc);
19964 int (*apply_all_case_fold)(OnigCaseFoldType flag, OnigApplyAllCaseFoldFunc f, void* arg, const struct OnigEncodingTypeST* enc);
19965 int (*get_case_fold_codes_by_str)(OnigCaseFoldType flag, const OnigUChar* p, const OnigUChar* end, OnigCaseFoldCodeItem acs[], const struct OnigEncodingTypeST* enc);
19966 int (*property_name_to_ctype)(const struct OnigEncodingTypeST* enc, const OnigUChar* p, const OnigUChar* end);
19967 int (*is_code_ctype)(OnigCodePoint code, OnigCtype ctype, const struct OnigEncodingTypeST* enc);
19968 int (*get_ctype_code_range)(OnigCtype ctype, OnigCodePoint* sb_out, const OnigCodePoint* ranges[], const struct OnigEncodingTypeST* enc);
19969 OnigUChar* (*left_adjust_char_head)(const OnigUChar* start, const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc);
19970 int (*is_allowed_reverse_match)(const OnigUChar* p, const OnigUChar* end, const struct OnigEncodingTypeST* enc);
19971 int (*case_map)(OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc);
19972 int ruby_encoding_index;
19973 unsigned int flags;
19975
19976typedef const OnigEncodingType* OnigEncoding;
19977
19978extern const OnigEncodingType OnigEncodingASCII;
19979
19980
19981extern
19982int onigenc_ascii_only_case_map(OnigCaseFoldType* flagP, const OnigUChar** pp, const OnigUChar* end, OnigUChar* to, OnigUChar* to_end, const struct OnigEncodingTypeST* enc);
19983
19984
19985
19986
19987
19988
19989
19990
19991
19992
19993
19994
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010extern
20011int onigenc_mbclen_approximate(const OnigUChar* p,const OnigUChar* e, const struct OnigEncodingTypeST* enc);
20012
20013
20014
20015
20016
20017
20018
20019
20020
20021
20022
20023
20024
20025
20026
20027
20028
20029
20030
20031
20032
20033extern
20034OnigUChar* onigenc_step_back(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end, int n);
20035
20036
20037
20038extern
20039int onigenc_init(void);
20040extern
20041int onigenc_set_default_encoding(OnigEncoding enc);
20042extern
20043OnigEncoding onigenc_get_default_encoding(void);
20044extern
20045OnigUChar* onigenc_get_right_adjust_char_head_with_prev(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end, const OnigUChar** prev);
20046extern
20047OnigUChar* onigenc_get_prev_char_head(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end);
20048extern
20049OnigUChar* onigenc_get_left_adjust_char_head(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end);
20050extern
20051OnigUChar* onigenc_get_right_adjust_char_head(OnigEncoding enc, const OnigUChar* start, const OnigUChar* s, const OnigUChar* end);
20052extern
20053int onigenc_strlen(OnigEncoding enc, const OnigUChar* p, const OnigUChar* end);
20054extern
20055int onigenc_strlen_null(OnigEncoding enc, const OnigUChar* p);
20056extern
20057int onigenc_str_bytelen_null(OnigEncoding enc, const OnigUChar* p);
20058
20059
20060
20061
20062
20063
20064
20065
20066typedef unsigned int OnigOptionType;
20067
20068
20069
20070
20071
20072
20073
20074
20075
20076typedef struct {
20077 unsigned int op;
20078 unsigned int op2;
20079 unsigned int behavior;
20080 OnigOptionType options;
20081 OnigMetaCharTableType meta_char_table;
20083
20084extern const OnigSyntaxType OnigSyntaxASIS;
20085extern const OnigSyntaxType OnigSyntaxPosixBasic;
20086extern const OnigSyntaxType OnigSyntaxPosixExtended;
20087extern const OnigSyntaxType OnigSyntaxEmacs;
20088extern const OnigSyntaxType OnigSyntaxGrep;
20089extern const OnigSyntaxType OnigSyntaxGnuRegex;
20090extern const OnigSyntaxType OnigSyntaxJava;
20091extern const OnigSyntaxType OnigSyntaxPerl58;
20092extern const OnigSyntaxType OnigSyntaxPerl58_NG;
20093extern const OnigSyntaxType OnigSyntaxPerl;
20094extern const OnigSyntaxType OnigSyntaxRuby;
20095extern const OnigSyntaxType OnigSyntaxPython;
20096
20097
20098
20099
20100extern const OnigSyntaxType* OnigDefaultSyntax;
20101
20102
20103
20104
20105
20106
20107
20108
20109
20110
20111
20112
20113
20114
20115
20116
20117
20118
20119
20120
20121
20122
20123
20124
20125
20126
20127
20129 int allocated;
20130 int num_regs;
20131 OnigPosition* beg;
20132 OnigPosition* end;
20133
20134
20135
20136
20137};
20138
20139
20140
20141
20142
20143
20144typedef struct re_registers OnigRegion;
20145
20146typedef struct {
20147 OnigEncoding enc;
20148 OnigUChar* par;
20149 OnigUChar* par_end;
20151
20152typedef struct {
20153 int lower;
20154 int upper;
20156
20157typedef void (*OnigWarnFunc)(const char* s);
20158extern void onig_null_warn(const char* s);
20159
20160
20161typedef struct re_pattern_buffer {
20162
20163 unsigned char* p;
20164 unsigned int used;
20165 unsigned int alloc;
20166
20167 int num_mem;
20168 int num_repeat;
20169 int num_null_check;
20170 int num_comb_exp_check;
20171 int num_call;
20172 unsigned int capture_history;
20173 unsigned int bt_mem_start;
20174 unsigned int bt_mem_end;
20175 int stack_pop_level;
20176 int repeat_range_alloc;
20177
20178 OnigOptionType options;
20179
20180 OnigRepeatRange* repeat_range;
20181
20182 OnigEncoding enc;
20183 const OnigSyntaxType* syntax;
20184 void* name_table;
20185 OnigCaseFoldType case_fold_flag;
20186
20187
20188 int optimize;
20189 int threshold_len;
20190 int anchor;
20191 OnigDistance anchor_dmin;
20192 OnigDistance anchor_dmax;
20193 int sub_anchor;
20194 unsigned char *exact;
20195 unsigned char *exact_end;
20196 unsigned char map[256];
20197 int *int_map;
20198 int *int_map_backward;
20199 OnigDistance dmin;
20200 OnigDistance dmax;
20201
20202
20203 struct re_pattern_buffer* chain;
20205
20206typedef OnigRegexType* OnigRegex;
20207
20208
20209typedef OnigRegexType regex_t;
20210
20211
20212
20213typedef struct {
20214 int num_of_elements;
20215 OnigEncoding pattern_enc;
20216 OnigEncoding target_enc;
20217 const OnigSyntaxType* syntax;
20218 OnigOptionType option;
20219 OnigCaseFoldType case_fold_flag;
20221
20222
20223extern
20224int onig_initialize(OnigEncoding encodings[], int n);
20225extern
20226int onig_init(void);
20227extern
20228int onig_error_code_to_str(OnigUChar* s, OnigPosition err_code, ...);
20229extern
20230void onig_set_warn_func(OnigWarnFunc f);
20231extern
20232void onig_set_verb_warn_func(OnigWarnFunc f);
20233extern
20234int onig_new(OnigRegex*, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigOptionType option, OnigEncoding enc, const OnigSyntaxType* syntax, OnigErrorInfo* einfo);
20235extern
20236int onig_reg_init(OnigRegex reg, OnigOptionType option, OnigCaseFoldType case_fold_flag, OnigEncoding enc, const OnigSyntaxType* syntax);
20237extern
20238int onig_new_without_alloc(OnigRegex, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigOptionType option, OnigEncoding enc, const OnigSyntaxType* syntax, OnigErrorInfo* einfo);
20239extern
20240int onig_new_deluxe(OnigRegex* reg, const OnigUChar* pattern, const OnigUChar* pattern_end, OnigCompileInfo* ci, OnigErrorInfo* einfo);
20241extern
20242void onig_free(OnigRegex);
20243extern
20244void onig_free_body(OnigRegex);
20245extern
20246OnigPosition onig_scan(OnigRegex reg, const OnigUChar* str, const OnigUChar* end, OnigRegion* region, OnigOptionType option, int (*scan_callback)(OnigPosition, OnigPosition, OnigRegion*, void*), void* callback_arg);
20247extern
20248OnigPosition onig_search(OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* start, const OnigUChar* range, OnigRegion* region, OnigOptionType option);
20249extern
20250OnigPosition onig_search_gpos(OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* global_pos, const OnigUChar* start, const OnigUChar* range, OnigRegion* region, OnigOptionType option);
20251extern
20252OnigPosition onig_match(OnigRegex, const OnigUChar* str, const OnigUChar* end, const OnigUChar* at, OnigRegion* region, OnigOptionType option);
20253extern
20254OnigRegion* onig_region_new(void);
20255extern
20256void onig_region_init(OnigRegion* region);
20257extern
20258void onig_region_free(OnigRegion* region, int free_self);
20259extern
20260void onig_region_copy(OnigRegion* to, const OnigRegion* from);
20261extern
20262void onig_region_clear(OnigRegion* region);
20263extern
20264int onig_region_resize(OnigRegion* region, int n);
20265extern
20266int onig_region_set(OnigRegion* region, int at, int beg, int end);
20267extern
20268int onig_name_to_group_numbers(OnigRegex reg, const OnigUChar* name, const OnigUChar* name_end, int** nums);
20269extern
20270int onig_name_to_backref_number(OnigRegex reg, const OnigUChar* name, const OnigUChar* name_end, const OnigRegion *region);
20271extern
20272int onig_foreach_name(OnigRegex reg, int (*func)(const OnigUChar*, const OnigUChar*,int,int*,OnigRegex,void*), void* arg);
20273extern
20274int onig_number_of_names(const OnigRegexType *reg);
20275extern
20276int onig_number_of_captures(const OnigRegexType *reg);
20277extern
20278int onig_number_of_capture_histories(const OnigRegexType *reg);
20279
20280
20281
20282
20283extern
20284int onig_capture_tree_traverse(OnigRegion* region, int at, int(*callback_func)(int,OnigPosition,OnigPosition,int,int,void*), void* arg);
20285extern
20286int onig_noname_group_capture_is_active(const OnigRegexType *reg);
20287extern
20288OnigEncoding onig_get_encoding(const OnigRegexType *reg);
20289extern
20290OnigOptionType onig_get_options(const OnigRegexType *reg);
20291extern
20292OnigCaseFoldType onig_get_case_fold_flag(const OnigRegexType *reg);
20293extern
20294const OnigSyntaxType* onig_get_syntax(const OnigRegexType *reg);
20295extern
20296int onig_set_default_syntax(const OnigSyntaxType* syntax);
20297extern
20298void onig_copy_syntax(OnigSyntaxType* to, const OnigSyntaxType* from);
20299extern
20300unsigned int onig_get_syntax_op(const OnigSyntaxType* syntax);
20301extern
20302unsigned int onig_get_syntax_op2(const OnigSyntaxType* syntax);
20303extern
20304unsigned int onig_get_syntax_behavior(const OnigSyntaxType* syntax);
20305extern
20306OnigOptionType onig_get_syntax_options(const OnigSyntaxType* syntax);
20307extern
20308void onig_set_syntax_op(OnigSyntaxType* syntax, unsigned int op);
20309extern
20310void onig_set_syntax_op2(OnigSyntaxType* syntax, unsigned int op2);
20311extern
20312void onig_set_syntax_behavior(OnigSyntaxType* syntax, unsigned int behavior);
20313extern
20314void onig_set_syntax_options(OnigSyntaxType* syntax, OnigOptionType options);
20315extern
20316int onig_set_meta_char(OnigSyntaxType* syntax, unsigned int what, OnigCodePoint code);
20317extern
20318void onig_copy_encoding(OnigEncodingType *to, OnigEncoding from);
20319extern
20320OnigCaseFoldType onig_get_default_case_fold_flag(void);
20321extern
20322int onig_set_default_case_fold_flag(OnigCaseFoldType case_fold_flag);
20323extern
20324unsigned int onig_get_match_stack_limit_size(void);
20325extern
20326int onig_set_match_stack_limit_size(unsigned int size);
20327extern
20328unsigned int onig_get_parse_depth_limit(void);
20329extern
20330int onig_set_parse_depth_limit(unsigned int depth);
20331extern
20332int onig_end(void);
20333extern
20334const char* onig_version(void);
20335extern
20336const char* onig_copyright(void);
20337
20338
20339
20340
20341enum ruby_encoding_consts {
20342 RUBY_ENCODING_INLINE_MAX = 127,
20343 RUBY_ENCODING_SHIFT = (RUBY_FL_USHIFT+10),
20344 RUBY_ENCODING_MASK = (RUBY_ENCODING_INLINE_MAX<<RUBY_ENCODING_SHIFT
20345 ),
20346 RUBY_ENCODING_MAXNAMELEN = 42
20347};
20348
20349
20350
20351
20352
20353
20354
20355
20356
20357
20358
20359
20360
20361enum ruby_coderange_type {
20369};
20370
20371static inline int
20372rb_enc_coderange_clean_p(int cr)
20373{
20374 return (cr ^ (cr >> 1)) & RUBY_ENC_CODERANGE_7BIT;
20375}
20376
20377
20378
20379
20380
20381
20382
20383
20384
20385
20386
20387
20388
20389
20390
20391typedef const OnigEncodingType rb_encoding;
20392
20393int rb_char_to_option_kcode(int c, int *option, int *kcode);
20394
20395int rb_enc_replicate(const char *, rb_encoding *);
20396int rb_define_dummy_encoding(const char *);
20397__attribute__((__pure__)) int rb_enc_dummy_p(rb_encoding *enc);
20398__attribute__((__pure__)) int rb_enc_to_index(rb_encoding *enc);
20399int rb_enc_get_index(VALUE obj);
20400void rb_enc_set_index(VALUE obj, int encindex);
20401int rb_enc_capable(VALUE obj);
20402int rb_enc_find_index(const char *name);
20403int rb_enc_alias(const char *alias, const char *orig);
20404int rb_to_encoding_index(VALUE);
20407rb_encoding *rb_enc_get(VALUE);
20408rb_encoding *rb_enc_compatible(VALUE,VALUE);
20409rb_encoding *rb_enc_check(VALUE,VALUE);
20410VALUE rb_enc_associate_index(VALUE, int);
20411VALUE rb_enc_associate(VALUE, rb_encoding*);
20412void rb_enc_copy(VALUE dst, VALUE src);
20413
20414VALUE rb_enc_str_new(const char*, long, rb_encoding*);
20415VALUE rb_enc_str_new_cstr(const char*, rb_encoding*);
20416VALUE rb_enc_str_new_static(const char*, long, rb_encoding*);
20417VALUE rb_enc_reg_new(const char*, long, rb_encoding*, int);
20418__attribute__((__format__(__printf__, (2), (3)))) VALUE rb_enc_sprintf(rb_encoding *, const char*, ...);
20419VALUE rb_enc_vsprintf(rb_encoding *, const char*, va_list);
20420long rb_enc_strlen(const char*, const char*, rb_encoding*);
20421char* rb_enc_nth(const char*, const char*, long, rb_encoding*);
20422VALUE rb_obj_encoding(VALUE);
20423VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc);
20424VALUE rb_enc_uint_chr(unsigned int code, rb_encoding *enc);
20425
20426VALUE rb_external_str_new_with_enc(const char *ptr, long len, rb_encoding *);
20427VALUE rb_str_export_to_enc(VALUE, rb_encoding *);
20428VALUE rb_str_conv_enc(VALUE str, rb_encoding *from, rb_encoding *to);
20429VALUE rb_str_conv_enc_opts(VALUE str, rb_encoding *from, rb_encoding *to, int ecflags, VALUE ecopts);
20430
20431
20432
20433
20434
20435
20436
20437
20438
20439
20440
20441
20442__attribute__((__format__(__printf__, (3), (4)))) __declspec(noreturn) void rb_enc_raise(rb_encoding *, VALUE, const char*, ...);
20443
20444
20446
20447
20448rb_encoding *rb_enc_find(const char *name);
20449
20450
20451
20452
20453
20454
20455int rb_enc_mbclen(const char *p, const char *e, rb_encoding *enc);
20456
20457
20458int rb_enc_fast_mbclen(const char *p, const char *e, rb_encoding *enc);
20459
20460
20461int rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc);
20462
20463
20464int rb_enc_ascget(const char *p, const char *e, int *len, rb_encoding *enc);
20465
20466
20467
20468unsigned int rb_enc_codepoint_len(const char *p, const char *e, int *len, rb_encoding *enc);
20469
20470
20471unsigned int rb_enc_codepoint(const char *p, const char *e, rb_encoding *enc);
20472
20473
20474
20475int rb_enc_codelen(int code, rb_encoding *enc);
20476
20477int rb_enc_code_to_mbclen(int code, rb_encoding *enc);
20478
20479
20480
20481
20482
20483
20484
20485
20486
20487static inline int
20488rb_enc_asciicompat_inline(rb_encoding *enc)
20489{
20490 return (enc)->min_enc_len==1 && !rb_enc_dummy_p(enc);
20491}
20492
20493int rb_enc_casefold(char *to, const char *p, const char *e, rb_encoding *enc);
20494__attribute__((__const__)) int rb_enc_toupper(int c, rb_encoding *enc);
20495__attribute__((__const__)) int rb_enc_tolower(int c, rb_encoding *enc);
20496ID rb_intern3(const char*, long, rb_encoding*);
20497ID rb_interned_id_p(const char *, long, rb_encoding *);
20498int rb_enc_symname_p(const char*, rb_encoding*);
20499int rb_enc_symname2_p(const char*, long, rb_encoding*);
20500int rb_enc_str_coderange(VALUE);
20501long rb_str_coderange_scan_restartable(const char*, const char*, rb_encoding*, int*);
20502int rb_enc_str_asciionly_p(VALUE);
20504__attribute__((__pure__)) int rb_enc_unicode_p(rb_encoding *enc);
20512
20513__attribute__((__const__)) int rb_ascii8bit_encindex(void);
20514
20515
20516__attribute__((__const__)) int rb_utf8_encindex(void);
20517
20518
20519__attribute__((__const__)) int rb_usascii_encindex(void);
20520
20521int rb_locale_encindex(void);
20522int rb_filesystem_encindex(void);
20523VALUE rb_enc_default_external(void);
20524VALUE rb_enc_default_internal(void);
20525void rb_enc_set_default_external(VALUE encoding);
20526void rb_enc_set_default_internal(VALUE encoding);
20527VALUE rb_locale_charmap(VALUE klass);
20528long rb_memsearch(const void*,long,const void*,long,rb_encoding*);
20529char *rb_enc_path_next(const char *,const char *,rb_encoding*);
20530char *rb_enc_path_skip_prefix(const char *,const char *,rb_encoding*);
20531char *rb_enc_path_last_separator(const char *,const char *,rb_encoding*);
20532char *rb_enc_path_end(const char *,const char *,rb_encoding*);
20533const char *ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encoding *enc);
20534const char *ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc);
20535ID rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc);
20536VALUE rb_check_symbol_cstr(const char *ptr, long len, rb_encoding *enc);
20537
20538extern VALUE rb_cEncoding;
20539
20540
20541
20542typedef enum {
20551
20552typedef struct rb_econv_t rb_econv_t;
20553
20554VALUE rb_str_encode(VALUE str, VALUE to, int ecflags, VALUE ecopts);
20555int rb_econv_has_convpath_p(const char* from_encoding, const char* to_encoding);
20556
20557int rb_econv_prepare_options(VALUE opthash, VALUE *ecopts, int ecflags);
20558int rb_econv_prepare_opts(VALUE opthash, VALUE *ecopts);
20559
20560rb_econv_t *rb_econv_open(const char *source_encoding, const char *destination_encoding, int ecflags);
20561rb_econv_t *rb_econv_open_opts(const char *source_encoding, const char *destination_encoding, int ecflags, VALUE ecopts);
20562
20563rb_econv_result_t rb_econv_convert(rb_econv_t *ec,
20564 const unsigned char **source_buffer_ptr, const unsigned char *source_buffer_end,
20565 unsigned char **destination_buffer_ptr, unsigned char *destination_buffer_end,
20566 int flags);
20567void rb_econv_close(rb_econv_t *ec);
20568
20569
20570int rb_econv_set_replacement(rb_econv_t *ec, const unsigned char *str, size_t len, const char *encname);
20571
20572
20573int rb_econv_decorate_at_first(rb_econv_t *ec, const char *decorator_name);
20574int rb_econv_decorate_at_last(rb_econv_t *ec, const char *decorator_name);
20575
20576VALUE rb_econv_open_exc(const char *senc, const char *denc, int ecflags);
20577
20578
20580 const unsigned char *str, size_t len, const char *str_encoding);
20581
20582
20584
20585
20587
20588
20590
20592void rb_econv_putback(rb_econv_t *ec, unsigned char *p, int n);
20593
20594
20595
20596const char *rb_econv_asciicompat_encoding(const char *encname);
20597
20598VALUE rb_econv_str_convert(rb_econv_t *ec, VALUE src, int flags);
20599VALUE rb_econv_substr_convert(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, int flags);
20600VALUE rb_econv_str_append(rb_econv_t *ec, VALUE src, VALUE dst, int flags);
20601VALUE rb_econv_substr_append(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, VALUE dst, int flags);
20602VALUE rb_econv_append(rb_econv_t *ec, const char *bytesrc, long bytesize, VALUE dst, int flags);
20603
20605
20606enum ruby_econv_flag_type {
20607
20608 RUBY_ECONV_ERROR_HANDLER_MASK = 0x000000ff,
20609
20610 RUBY_ECONV_INVALID_MASK = 0x0000000f,
20611 RUBY_ECONV_INVALID_REPLACE = 0x00000002,
20612
20613 RUBY_ECONV_UNDEF_MASK = 0x000000f0,
20614 RUBY_ECONV_UNDEF_REPLACE = 0x00000020,
20615 RUBY_ECONV_UNDEF_HEX_CHARREF = 0x00000030,
20616
20617 RUBY_ECONV_DECORATOR_MASK = 0x0000ff00,
20621
20625 RUBY_ECONV_XML_TEXT_DECORATOR = 0x00004000,
20627
20630
20632
20633
20634
20635 0,
20636
20637
20638
20639
20640 RUBY_ECONV_PARTIAL_INPUT = 0x00010000,
20641 RUBY_ECONV_AFTER_OUTPUT = 0x00020000,
20642
20644
20645
20646
20647
20648
20649
20650
20651
20652VALUE rb_fstring(VALUE);
20653VALUE rb_fstring_cstr(const char *str);
20654VALUE rb_fstring_enc_new(const char *ptr, long len, rb_encoding *enc);
20655int rb_str_buf_cat_escaped_char(VALUE result, unsigned int c, int unicode_p);
20656int rb_str_symname_p(VALUE);
20657VALUE rb_str_quote_unprintable(VALUE);
20658char *rb_str_fill_terminator(VALUE str, const int termlen);
20659void rb_str_change_terminator_length(VALUE str, const int oldtermlen, const int termlen);
20660VALUE rb_str_locktmp_ensure(VALUE str, VALUE (*func)(VALUE), VALUE arg);
20661VALUE rb_str_chomp_string(VALUE str, VALUE chomp);
20662VALUE rb_external_str_with_enc(VALUE str, rb_encoding *eenc);
20663VALUE rb_str_cat_conv_enc_opts(VALUE newstr, long ofs, const char *ptr, long len,
20664 rb_encoding *from, int ecflags, VALUE ecopts);
20665VALUE rb_enc_str_scrub(rb_encoding *enc, VALUE str, VALUE repl);
20666VALUE rb_str_initialize(VALUE str, const char *ptr, long len, rb_encoding *enc);
20667size_t rb_str_memsize(VALUE);
20668char *rb_str_to_cstr(VALUE str);
20669const char *ruby_escaped_char(int c);
20670static inline _Bool STR_EMBED_P(VALUE str);
20671static inline _Bool STR_SHARED_P(VALUE str);
20672static inline VALUE QUOTE(VALUE v);
20673static inline VALUE QUOTE_ID(ID v);
20674static inline _Bool is_ascii_string(VALUE str);
20675static inline _Bool is_broken_string(VALUE str);
20676static inline VALUE rb_str_eql_internal(const VALUE str1, const VALUE str2);
20677
20678
20679VALUE rb_str_tmp_frozen_acquire(VALUE str);
20680void rb_str_tmp_frozen_release(VALUE str, VALUE tmp);
20681VALUE rb_setup_fake_str(struct RString *fake_str, const char *name, long len, rb_encoding *enc);
20682VALUE rb_str_upto_each(VALUE, VALUE, int, int (*each)(VALUE, VALUE), VALUE);
20683VALUE rb_str_upto_endless_each(VALUE, int (*each)(VALUE, VALUE), VALUE);
20684
20685VALUE rb_fstring_new(const char *ptr, long len);
20686VALUE rb_obj_as_string_result(VALUE str, VALUE obj);
20687VALUE rb_str_opt_plus(VALUE x, VALUE y);
20688VALUE rb_str_concat_literals(size_t num, const VALUE *strary);
20689VALUE rb_str_eql(VALUE str1, VALUE str2);
20690VALUE rb_id_quote_unprintable(ID);
20691VALUE rb_sym_proc_call(ID mid, int argc, const VALUE *argv, int kw_splat, VALUE passed_proc);
20692
20693
20694static inline VALUE
20695QUOTE(VALUE v)
20696{
20697 return rb_str_quote_unprintable(v);
20698}
20699
20700static inline VALUE
20701QUOTE_ID(ID i)
20702{
20703 return rb_id_quote_unprintable(i);
20704}
20705
20706static inline _Bool
20707STR_EMBED_P(VALUE str)
20708{
20709 return ! RB_FL_TEST_RAW(str, ((VALUE)RUBY_FL_USER1));
20710}
20711
20712static inline _Bool
20713STR_SHARED_P(VALUE str)
20714{
20715 return RB_FL_ALL_RAW(str, ((VALUE)RUBY_FL_USER1) | RUBY_ELTS_SHARED);
20716}
20717
20718static inline _Bool
20719is_ascii_string(VALUE str)
20720{
20722}
20723
20724static inline _Bool
20725is_broken_string(VALUE str)
20726{
20728}
20729
20730
20731static inline VALUE
20732rb_str_eql_internal(const VALUE str1, const VALUE str2)
20733{
20734 const long len = RSTRING_LEN(str1);
20735 const char *ptr1, *ptr2;
20736
20737 if (len != RSTRING_LEN(str2)) return ((VALUE)RUBY_Qfalse);
20738 if (!rb_str_comparable(str1, str2)) return ((VALUE)RUBY_Qfalse);
20739 if ((ptr1 = RSTRING_PTR(str1)) == (ptr2 = RSTRING_PTR(str2)))
20740 return ((VALUE)RUBY_Qtrue);
20741 if (memcmp(ptr1, ptr2, len) == 0)
20742 return ((VALUE)RUBY_Qtrue);
20743 return ((VALUE)RUBY_Qfalse);
20744}
20745
20746
20747
20748
20749
20750
20751
20752
20753
20754
20755
20756
20757
20758
20759
20760
20761
20762typedef enum {
20767
20768extern long rb_backtrace_length_limit;
20769extern VALUE rb_eEAGAIN;
20770extern VALUE rb_eEWOULDBLOCK;
20771extern VALUE rb_eEINPROGRESS;
20772void rb_report_bug_valist(VALUE file, int line, const char *fmt, va_list args);
20773__declspec(noreturn) void rb_async_bug_errno(const char *,int);
20774const char *rb_builtin_type_name(int t);
20775const char *rb_builtin_class_name(VALUE x);
20776__attribute__((__format__(__printf__, (1), (3)))) void rb_warn_deprecated(const char *fmt, const char *suggest, ...);
20777__attribute__((__format__(__printf__, (1), (3)))) void rb_warn_deprecated_to_remove(const char *fmt, const char *removal, ...);
20778VALUE rb_syntax_error_append(VALUE, VALUE, int, int, rb_encoding*, const char*, va_list);
20779__attribute__((__format__(__printf__, (2), (3)))) void rb_enc_warn(rb_encoding *enc, const char *fmt, ...);
20780__attribute__((__format__(__printf__, (2), (3)))) void rb_sys_enc_warning(rb_encoding *enc, const char *fmt, ...);
20781__attribute__((__format__(__printf__, (3), (4)))) void rb_syserr_enc_warning(int err, rb_encoding *enc, const char *fmt, ...);
20782rb_warning_category_t rb_warning_category_from_name(VALUE category);
20783_Bool rb_warning_category_enabled_p(rb_warning_category_t category);
20784VALUE rb_name_err_new(VALUE mesg, VALUE recv, VALUE method);
20785VALUE rb_nomethod_err_new(VALUE mesg, VALUE recv, VALUE method, VALUE args, int priv);
20786VALUE rb_key_err_new(VALUE mesg, VALUE recv, VALUE name);
20787__attribute__((__format__(__printf__, (1), (2)))) VALUE rb_warning_string(const char *fmt, ...);
20788__declspec(noreturn) void rb_vraise(VALUE, const char *, va_list);
20789__declspec(noreturn) static inline void rb_raise_cstr(VALUE etype, const char *mesg);
20790__declspec(noreturn) static inline void rb_raise_cstr_i(VALUE etype, VALUE mesg);
20791__declspec(noreturn) static inline void rb_name_err_raise_str(VALUE mesg, VALUE recv, VALUE name);
20792__declspec(noreturn) static inline void rb_name_err_raise(const char *mesg, VALUE recv, VALUE name);
20793__declspec(noreturn) static inline void rb_key_err_raise(VALUE mesg, VALUE recv, VALUE name);
20794static inline void Check_Type(VALUE v, enum ruby_value_type t);
20795static inline _Bool rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type);
20796
20797
20798int rb_bug_reporter_add(void (*func)(FILE *, void *), void *data);
20799
20800__declspec(noreturn) void rb_sys_fail_path_in(const char *func_name, VALUE path);
20801__declspec(noreturn) void rb_syserr_fail_path_in(const char *func_name, int err, VALUE path);
20802VALUE rb_syserr_new_path_in(const char *func_name, int n, VALUE path);
20803
20804
20805static inline void
20806rb_raise_cstr_i(VALUE etype, VALUE mesg)
20807{
20808 VALUE exc = rb_exc_new_str(etype, mesg);
20809 rb_exc_raise(exc);
20810}
20811
20812static inline void
20813rb_raise_cstr(VALUE etype, const char *mesg)
20814{
20815 VALUE str = ((__builtin_constant_p(mesg) ? rbimpl_str_new_cstr : rb_str_new_cstr) (mesg));
20816 rb_raise_cstr_i(etype, str);
20817}
20818
20819static inline void
20820rb_name_err_raise_str(VALUE mesg, VALUE recv, VALUE name)
20821{
20822 VALUE exc = rb_name_err_new(mesg, recv, name);
20823 rb_exc_raise(exc);
20824}
20825
20826static inline void
20827rb_name_err_raise(const char *mesg, VALUE recv, VALUE name)
20828{
20829 VALUE str = (__builtin_constant_p(mesg) ? rb_fstring_new((mesg), (long)strlen(mesg)) : (rb_fstring_cstr)(mesg));
20830 rb_name_err_raise_str(str, recv, name);
20831}
20832
20833static inline void
20834rb_key_err_raise(VALUE mesg, VALUE recv, VALUE name)
20835{
20836 VALUE exc = rb_key_err_new(mesg, recv, name);
20837 rb_exc_raise(exc);
20838}
20839
20840static inline _Bool
20841rb_typeddata_is_instance_of_inline(VALUE obj, const rb_data_type_t *data_type)
20842{
20843 return (__builtin_constant_p(RUBY_T_DATA) ? rbimpl_RB_TYPE_P_fastpath((obj), (RUBY_T_DATA)) : (RB_TYPE_P)((obj), (RUBY_T_DATA))) && RTYPEDDATA_P(obj) && (RTYPEDDATA_TYPE(obj) == data_type);
20844}
20845
20846
20847
20848extern ID ruby_static_id_signo;
20849extern ID ruby_static_id_status;
20850VALUE rb_refinement_module_get_refined_class(VALUE module);
20851void rb_class_modify_check(VALUE);
20852__declspec(noreturn) VALUE rb_f_raise(int argc, VALUE *argv);
20853
20854
20855VALUE rb_get_backtrace(VALUE info);
20856
20857
20858void rb_call_end_proc(VALUE data);
20859void rb_mark_end_proc(void);
20860
20861void Init_class_hierarchy(void);
20862
20863
20864void Init_enc(void);
20865void Init_ext(void);
20866
20867
20868void Init_File(void);
20869
20870
20871void Init_heap(void);
20872
20873
20874int Init_enc_set_filesystem_encoding(void);
20875
20876
20877void Init_newline(void);
20878
20879
20880void Init_BareVM(void);
20881void Init_vm_objects(void);
20882
20883
20884void Init_vm_backtrace(void);
20885
20886
20887void Init_vm_eval(void);static inline
20888
20889
20890void Init_vm_stack_canary(void);
20891
20892
20893void Init_eval_method(void);
20894
20895
20896void rb_call_inits(void);
20897
20898extern _Bool mjit_enabled;
20899VALUE mjit_pause(_Bool wait_p);
20900VALUE mjit_resume(void);
20901void mjit_finish(_Bool close_handle_p);
20902
20903
20904
20905
20906
20907
20908
20909struct rb_id_table;
20910
20911
20912enum rb_id_table_iterator_result {
20913 ID_TABLE_CONTINUE = ST_CONTINUE,
20914 ID_TABLE_STOP = ST_STOP,
20915 ID_TABLE_DELETE = ST_DELETE,
20916 ID_TABLE_REPLACE = ST_REPLACE,
20917 ID_TABLE_ITERATOR_RESULT_END
20918};
20919
20920struct rb_id_table *rb_id_table_create(size_t size);
20921void rb_id_table_free(struct rb_id_table *tbl);
20922void rb_id_table_clear(struct rb_id_table *tbl);
20923
20924size_t rb_id_table_size(const struct rb_id_table *tbl);
20925size_t rb_id_table_memsize(const struct rb_id_table *tbl);
20926
20927int rb_id_table_insert(struct rb_id_table *tbl, ID id, VALUE val);
20928int rb_id_table_lookup(struct rb_id_table *tbl, ID id, VALUE *valp);
20929int rb_id_table_delete(struct rb_id_table *tbl, ID id);
20930
20931typedef enum rb_id_table_iterator_result rb_id_table_update_callback_func_t(ID *id, VALUE *val, void *data, int existing);
20932typedef enum rb_id_table_iterator_result rb_id_table_foreach_func_t(ID id, VALUE val, void *data);
20933typedef enum rb_id_table_iterator_result rb_id_table_foreach_values_func_t(VALUE val, void *data);
20934void rb_id_table_foreach(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, void *data);
20935void rb_id_table_foreach_with_replace(struct rb_id_table *tbl, rb_id_table_foreach_func_t *func, rb_id_table_update_callback_func_t *replace, void *data);
20936void rb_id_table_foreach_values(struct rb_id_table *tbl, rb_id_table_foreach_values_func_t *func, void *data);
20938 char conflict[sizeof(VALUE) * 3];
20939};
20940
20941struct rb_subclass_entry {
20942 VALUE klass;
20943 struct rb_subclass_entry *next;
20944};
20945
20946struct rb_classext_struct {
20947 struct st_table *iv_index_tbl;
20948 struct st_table *iv_tbl;
20949
20950 struct rb_id_table *m_tbl;
20951
20952 struct rb_id_table *const_tbl;
20953 struct rb_id_table *callable_m_tbl;
20954 struct rb_id_table *cc_tbl;
20955 struct rb_subclass_entry *subclasses;
20956 struct rb_subclass_entry **parent_subclasses;
20957
20958
20959
20960
20961
20962 struct rb_subclass_entry **module_subclasses;
20963
20964
20965
20966 const VALUE origin_;
20967 const VALUE refined_class;
20968 rb_alloc_func_t allocator;
20969 const VALUE includer;
20970};
20971
20972struct RClass {
20973 struct RBasic basic;
20974 VALUE super;
20975 struct rb_classext_struct *ptr;
20976
20977
20978 rb_serial_t class_serial;
20979
20980
20981
20982
20983};
20984
20986typedef struct rb_classext_struct rb_classext_t;
20987
20988
20989
20990
20991
20992
20993
20994
20995
20996
20997
20998
20999void rb_class_subclass_add(VALUE super, VALUE klass);
21000void rb_class_remove_from_super_subclasses(VALUE);
21001int rb_singleton_class_internal_p(VALUE sklass);
21002VALUE rb_class_boot(VALUE);
21003VALUE rb_make_metaclass(VALUE, VALUE);
21004VALUE rb_include_class_new(VALUE, VALUE);
21005void rb_class_foreach_subclass(VALUE klass, void (*f)(VALUE, VALUE), VALUE);
21006void rb_class_detach_subclasses(VALUE);
21007void rb_class_detach_module_subclasses(VALUE);
21008void rb_class_remove_from_module_subclasses(VALUE);
21009VALUE rb_obj_methods(int argc, const VALUE *argv, VALUE obj);
21010VALUE rb_obj_protected_methods(int argc, const VALUE *argv, VALUE obj);
21011VALUE rb_obj_private_methods(int argc, const VALUE *argv, VALUE obj);
21012VALUE rb_obj_public_methods(int argc, const VALUE *argv, VALUE obj);
21013VALUE rb_special_singleton_class(VALUE);
21014VALUE rb_singleton_class_clone_and_attach(VALUE obj, VALUE attach);
21015VALUE rb_singleton_class_get(VALUE obj);
21016int rb_class_has_methods(VALUE c);
21017void rb_undef_methods_from(VALUE klass, VALUE super);
21018
21019static inline void RCLASS_SET_ORIGIN(VALUE klass, VALUE origin);
21020static inline void RICLASS_SET_ORIGIN_SHARED_MTBL(VALUE iclass);
21021static inline VALUE RCLASS_SUPER(VALUE klass);
21022static inline VALUE RCLASS_SET_SUPER(VALUE klass, VALUE super);
21023static inline void RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass);
21024
21025VALUE rb_class_inherited(VALUE, VALUE);
21026VALUE rb_keyword_error_new(const char *, VALUE);
21027
21028static inline void
21029RCLASS_SET_ORIGIN(VALUE klass, VALUE origin)
21030{
21031 __extension__({
21032;
21033; __typeof__(rb_obj_write((VALUE)(klass), (VALUE *)(&((((struct RClass *)(klass))->ptr)->origin_)), (VALUE)(origin), "./internal/class.h", 137)) unaligned_member_access_result = (rb_obj_write((VALUE)(klass), (VALUE *)(&((((struct RClass *)(klass))->ptr)->origin_)), (VALUE)(origin), "./internal/class.h", 137));
21034; unaligned_member_access_result; });
21035 if (klass != origin) RB_FL_SET(origin, ((VALUE)RUBY_FL_USER5));
21036}
21037
21038static inline void
21039RICLASS_SET_ORIGIN_SHARED_MTBL(VALUE iclass)
21040{
21041 RB_FL_SET(iclass, ((VALUE)RUBY_FL_USER8));
21042}
21043
21044static inline _Bool
21045RICLASS_OWNS_M_TBL_P(VALUE iclass)
21046{
21047 return RB_FL_TEST_RAW(iclass, ((VALUE)RUBY_FL_USER5) | ((VALUE)RUBY_FL_USER8)) == ((VALUE)RUBY_FL_USER5);
21048}
21049
21050static inline void
21051RCLASS_SET_INCLUDER(VALUE iclass, VALUE klass)
21052{
21053 __extension__({
21054;
21055; __typeof__(rb_obj_write((VALUE)(iclass), (VALUE *)(&((((struct RClass *)(iclass))->ptr)->includer)), (VALUE)(klass), "./internal/class.h", 156)) unaligned_member_access_result = (rb_obj_write((VALUE)(iclass), (VALUE *)(&((((struct RClass *)(iclass))->ptr)->includer)), (VALUE)(klass), "./internal/class.h", 156));
21056; unaligned_member_access_result; });
21057}
21058
21059static inline VALUE
21060RCLASS_SUPER(VALUE klass)
21061{
21062 return ((struct RClass *)(klass))->super;
21063}
21064
21065static inline VALUE
21066RCLASS_SET_SUPER(VALUE klass, VALUE super)
21067{
21068 if (super) {
21069 rb_class_remove_from_super_subclasses(klass);
21070 rb_class_subclass_add(super, klass);
21071 }
21072 __extension__({
21073;
21074; __typeof__(rb_obj_write((VALUE)(klass), (VALUE *)(&((struct RClass *)(klass))->super), (VALUE)(super), "./internal/class.h", 172)) unaligned_member_access_result = (rb_obj_write((VALUE)(klass), (VALUE *)(&((struct RClass *)(klass))->super), (VALUE)(super), "./internal/class.h", 172));
21075; unaligned_member_access_result; });
21076 return super;
21077}
21078
21079
21080
21081
21082
21083
21084VALUE rb_class_search_ancestor(VALUE klass, VALUE super);
21085__declspec(noreturn) void rb_undefined_alloc(VALUE klass);
21086double rb_num_to_dbl(VALUE val);
21087VALUE rb_obj_dig(int argc, VALUE *argv, VALUE self, VALUE notfound);
21088VALUE rb_immutable_obj_clone(int, VALUE *, VALUE);
21089VALUE rb_check_convert_type_with_id(VALUE,int,const char*,ID);
21090int rb_bool_expected(VALUE, const char *);
21091static inline void RBASIC_CLEAR_CLASS(VALUE obj);
21092static inline void RBASIC_SET_CLASS_RAW(VALUE obj, VALUE klass);
21093static inline void RBASIC_SET_CLASS(VALUE obj, VALUE klass);
21094static inline struct st_table *ROBJECT_IV_INDEX_TBL_inline(VALUE obj);
21095
21096
21097int rb_opts_exception_p(VALUE opts, int default_value);
21098
21099__attribute__((__const__)) VALUE rb_obj_equal(VALUE obj1, VALUE obj2);
21100__attribute__((__const__)) VALUE rb_obj_not(VALUE obj);
21101VALUE rb_obj_not_equal(VALUE obj1, VALUE obj2);
21102void rb_obj_copy_ivar(VALUE dest, VALUE obj);
21103VALUE rb_false(VALUE obj);
21104VALUE rb_convert_type_with_id(VALUE v, int t, const char* nam, ID mid);
21105VALUE rb_obj_size(VALUE self, VALUE args, VALUE obj);
21106
21107static inline void
21108RBASIC_SET_CLASS_RAW(VALUE obj, VALUE klass)
21109{
21110 struct { VALUE flags; VALUE klass; } *ptr = (void *)obj;
21111 ptr->klass = klass;
21112}
21113
21114static inline void
21115RBASIC_CLEAR_CLASS(VALUE obj)
21116{
21117 RBASIC_SET_CLASS_RAW(obj, 0);
21118}
21119
21120static inline void
21121RBASIC_SET_CLASS(VALUE obj, VALUE klass)
21122{
21123 VALUE oldv = RBASIC_CLASS(obj);
21124 RBASIC_SET_CLASS_RAW(obj, klass);
21125 (rb_obj_written((VALUE)(obj), (VALUE)(oldv), (VALUE)(klass), "./internal/object.h", 65));
21126}
21127
21128__attribute__((__pure__))
21129static inline struct st_table *
21130ROBJECT_IV_INDEX_TBL_inline(VALUE obj)
21131{
21132 if (RB_FL_ANY_RAW(obj, ROBJECT_EMBED)) {
21133 VALUE klass = rb_obj_class(obj);
21134 return ((((struct RClass *)(klass))->ptr)->iv_index_tbl);
21135 }
21136 else {
21137 const struct RObject *const ptr = ((struct RObject *)(obj));
21138 return ptr->as.heap.iv_index_tbl;
21139 }
21140}
21141
21142struct rb_iseq_struct;
21143
21144
21145VALUE rb_parser_set_yydebug(VALUE, VALUE);
21146void *rb_parser_load_file(VALUE parser, VALUE name);
21147
21148VALUE rb_parser_set_context(VALUE, const struct rb_iseq_struct *, int);
21149
21150struct rb_block;
21151struct rb_iseq_struct;
21152
21153
21154VALUE rb_proc_location(VALUE self);
21155st_index_t rb_hash_proc(st_index_t hash, VALUE proc);
21156int rb_block_pair_yield_optimizable(void);
21157int rb_block_arity(void);
21158int rb_block_min_max_arity(int *max);
21159VALUE rb_block_to_s(VALUE self, const struct rb_block *block, const char *additional_info);
21160
21161VALUE rb_func_proc_new(rb_block_call_func_t func, VALUE val);
21162VALUE rb_func_lambda_new(rb_block_call_func_t func, VALUE val, int min_argc, int max_argc);
21163VALUE rb_iseq_location(const struct rb_iseq_struct *iseq);
21164VALUE rb_sym_to_proc(VALUE sym);
21165
21166VALUE rb_reg_compile(VALUE str, int options, const char *sourcefile, int sourceline);
21167VALUE rb_reg_check_preprocess(VALUE);
21168long rb_reg_search0(VALUE, VALUE, long, int, int);
21169VALUE rb_reg_match_p(VALUE re, VALUE str, long pos);
21170_Bool rb_reg_start_with_p(VALUE re, VALUE str);
21171void rb_backref_set_string(VALUE string, long pos, long len);
21172void rb_match_unbusy(VALUE);
21173int rb_match_count(VALUE match);
21174int rb_match_nth_defined(int nth, VALUE match);
21175VALUE rb_reg_new_ary(VALUE ary, int options);
21176
21177
21178
21179
21180VALUE rb_to_symbol_type(VALUE obj);
21181VALUE rb_sym_intern(const char *ptr, long len, rb_encoding *enc);
21182VALUE rb_sym_intern_ascii(const char *ptr, long len);
21183VALUE rb_sym_intern_ascii_cstr(const char *ptr);
21184int rb_is_const_name(VALUE name);
21185int rb_is_class_name(VALUE name);
21186int rb_is_instance_name(VALUE name);
21187int rb_is_local_name(VALUE name);
21188__attribute__((__pure__)) int rb_is_const_sym(VALUE sym);
21189__attribute__((__pure__)) int rb_is_attrset_sym(VALUE sym);
21190ID rb_make_internal_id(void);
21191void rb_gc_free_dsymbol(VALUE);
21192
21193
21194
21195
21196extern const int ruby_api_version[];
21197
21198
21199
21200
21201
21202
21203extern const ID rb_iseq_shared_exc_local_tbl[];
21204
21205
21206
21207
21208static inline rb_snum_t
21209ISEQ_FLIP_CNT_INCREMENT(const rb_iseq_t *iseq)
21210{
21211 rb_snum_t cnt = iseq->body->variable.flip_count;
21212 iseq->body->variable.flip_count += 1;
21213 return cnt;
21214}
21215
21216static inline VALUE *
21217ISEQ_ORIGINAL_ISEQ(const rb_iseq_t *iseq)
21218{
21219 return iseq->body->variable.original_iseq;
21220}
21221
21222static inline void
21223ISEQ_ORIGINAL_ISEQ_CLEAR(const rb_iseq_t *iseq)
21224{
21225 void *ptr = iseq->body->variable.original_iseq;
21226 iseq->body->variable.original_iseq = ((void*)0);
21227 if (ptr) {
21228 ruby_xfree(ptr);
21229 }
21230}
21231
21232static inline VALUE *
21233ISEQ_ORIGINAL_ISEQ_ALLOC(const rb_iseq_t *iseq, long size)
21234{
21235 return iseq->body->variable.original_iseq =
21236 ((VALUE *)ruby_xmalloc2((size), sizeof(VALUE)));
21237}
21238
21239
21240
21241struct iseq_compile_data {
21242
21243 const VALUE err_info;
21244 const VALUE catch_table_ary;
21245
21246
21247 struct iseq_label_data *start_label;
21248 struct iseq_label_data *end_label;
21249 struct iseq_label_data *redo_label;
21250 const rb_iseq_t *current_block;
21251 struct iseq_compile_data_ensure_node_stack *ensure_node_stack;
21252 struct {
21253 struct iseq_compile_data_storage *storage_head;
21254 struct iseq_compile_data_storage *storage_current;
21255 } node;
21256 struct {
21257 struct iseq_compile_data_storage *storage_head;
21258 struct iseq_compile_data_storage *storage_current;
21259 } insn;
21260 int loopval_popped;
21261 int last_line;
21262 int label_no;
21263 int node_level;
21264 unsigned int ci_index;
21265 const rb_compile_option_t *option;
21266 struct rb_id_table *ivar_cache_table;
21267 const struct rb_builtin_function *builtin_function_table;
21268
21269
21270
21271};
21272
21273static inline struct iseq_compile_data *
21274ISEQ_COMPILE_DATA(const rb_iseq_t *iseq)
21275{
21276 if (iseq->flags & ((VALUE)RUBY_FL_USER6)) {
21277 return iseq->aux.compile_data;
21278 }
21279 else {
21280 return ((void*)0);
21281 }
21282}
21283
21284static inline void
21285ISEQ_COMPILE_DATA_ALLOC(rb_iseq_t *iseq)
21286{
21287 iseq->aux.compile_data = (((struct iseq_compile_data *)ruby_xcalloc((1), sizeof(struct iseq_compile_data))));
21288 iseq->flags |= ((VALUE)RUBY_FL_USER6);
21289}
21290
21291static inline void
21292ISEQ_COMPILE_DATA_CLEAR(rb_iseq_t *iseq)
21293{
21294 iseq->flags &= ~((VALUE)RUBY_FL_USER6);
21295 iseq->aux.compile_data = ((void*)0);
21296}
21297
21298static inline rb_iseq_t *
21299iseq_imemo_alloc(void)
21300{
21301 return (rb_iseq_t *)rb_imemo_new(imemo_iseq, 0, 0, 0, 0);
21302}
21303
21304VALUE rb_iseq_ibf_dump(const rb_iseq_t *iseq, VALUE opt);
21305void rb_ibf_load_iseq_complete(rb_iseq_t *iseq);
21306const rb_iseq_t *rb_iseq_ibf_load(VALUE str);
21307const rb_iseq_t *rb_iseq_ibf_load_bytes(const char *cstr, size_t);
21308VALUE rb_iseq_ibf_load_extra_data(VALUE str);
21309void rb_iseq_init_trace(rb_iseq_t *iseq);
21310int rb_iseq_add_local_tracepoint_recursively(const rb_iseq_t *iseq, rb_event_flag_t turnon_events, VALUE tpval, unsigned int target_line);
21311int rb_iseq_remove_local_tracepoint_recursively(const rb_iseq_t *iseq, VALUE tpval);
21312const rb_iseq_t *rb_iseq_load_iseq(VALUE fname);
21313
21314
21315unsigned int *rb_iseq_insns_info_decode_positions(const struct rb_iseq_constant_body *body);
21316
21317
21318
21319
21320VALUE rb_iseq_compile_node(rb_iseq_t *iseq, const NODE *node);
21321VALUE rb_iseq_compile_callback(rb_iseq_t *iseq, const struct rb_iseq_new_with_callback_callback_func * ifunc);
21322VALUE *rb_iseq_original_iseq(const rb_iseq_t *iseq);
21323void rb_iseq_build_from_ary(rb_iseq_t *iseq, VALUE misc,
21324 VALUE locals, VALUE args,
21325 VALUE exception, VALUE body);
21326void rb_iseq_mark_insn_storage(struct iseq_compile_data_storage *arena);
21327
21328
21329VALUE rb_iseq_load(VALUE data, VALUE parent, VALUE opt);
21330VALUE rb_iseq_parameters(const rb_iseq_t *iseq, int is_proc);
21331unsigned int rb_iseq_line_no(const rb_iseq_t *iseq, size_t pos);
21332void rb_iseq_trace_set(const rb_iseq_t *iseq, rb_event_flag_t turnon_events);
21333void rb_iseq_trace_set_all(rb_event_flag_t turnon_events);
21334void rb_iseq_insns_info_encode_positions(const rb_iseq_t *iseq);
21335
21336struct rb_iseq_constant_body *rb_iseq_constant_body_alloc(void);
21337VALUE rb_iseqw_new(const rb_iseq_t *iseq);
21338const rb_iseq_t *rb_iseqw_to_iseq(VALUE iseqw);
21339
21340VALUE rb_iseq_absolute_path(const rb_iseq_t *iseq);
21341VALUE rb_iseq_label(const rb_iseq_t *iseq);
21342VALUE rb_iseq_base_label(const rb_iseq_t *iseq);
21343VALUE rb_iseq_first_lineno(const rb_iseq_t *iseq);
21344VALUE rb_iseq_method_name(const rb_iseq_t *iseq);
21345void rb_iseq_code_location(const rb_iseq_t *iseq, int *first_lineno, int *first_column, int *last_lineno, int *last_column);
21346
21347void rb_iseq_remove_coverage_all(void);
21348
21349
21350const rb_iseq_t *rb_method_iseq(VALUE body);
21351const rb_iseq_t *rb_proc_get_iseq(VALUE proc, int *is_proc);
21352
21354 unsigned int inline_const_cache: 1;
21355 unsigned int peephole_optimization: 1;
21356 unsigned int tailcall_optimization: 1;
21357 unsigned int specialized_instruction: 1;
21358 unsigned int operands_unification: 1;
21359 unsigned int instructions_unification: 1;
21360 unsigned int stack_caching: 1;
21361 unsigned int frozen_string_literal: 1;
21362 unsigned int debug_frozen_string_literal: 1;
21363 unsigned int coverage_enabled: 1;
21364 int debug_level;
21365};
21366
21367struct iseq_insn_info_entry {
21368 int line_no;
21369 rb_event_flag_t events;
21370};
21371
21373 enum catch_type {
21374 CATCH_TYPE_RESCUE = __builtin_choose_expr( __builtin_constant_p(1), ((VALUE)(1)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(1)),
21375 CATCH_TYPE_ENSURE = __builtin_choose_expr( __builtin_constant_p(2), ((VALUE)(2)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(2)),
21376 CATCH_TYPE_RETRY = __builtin_choose_expr( __builtin_constant_p(3), ((VALUE)(3)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(3)),
21377 CATCH_TYPE_BREAK = __builtin_choose_expr( __builtin_constant_p(4), ((VALUE)(4)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(4)),
21378 CATCH_TYPE_REDO = __builtin_choose_expr( __builtin_constant_p(5), ((VALUE)(5)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(5)),
21379 CATCH_TYPE_NEXT = __builtin_choose_expr( __builtin_constant_p(6), ((VALUE)(6)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(6))
21380 } type;
21381 rb_iseq_t *iseq;
21382
21383 unsigned int start;
21384 unsigned int end;
21385 unsigned int cont;
21386 unsigned int sp;
21387};
21388
21389struct iseq_catch_table { unsigned int size; struct iseq_catch_table_entry entries[];} __attribute__((packed));
21390
21391
21392
21393
21394static inline int
21395iseq_catch_table_bytes(int n)
21396{
21397 enum {
21398 catch_table_entry_size = sizeof(struct iseq_catch_table_entry),
21399 catch_table_entries_max = (2147483647 - __builtin_offsetof(struct iseq_catch_table, entries)) / catch_table_entry_size
21400 };
21401 if (n > catch_table_entries_max) rb_fatal("too large iseq_catch_table - %d", n);
21402 return (int)(__builtin_offsetof(struct iseq_catch_table, entries) +
21403 n * catch_table_entry_size);
21404}
21405
21406
21408 struct iseq_compile_data_storage *next;
21409 unsigned int pos;
21410 unsigned int size;
21411 char buff[];
21412};
21413
21414
21415
21416enum defined_type {
21417 DEFINED_NOT_DEFINED,
21418 DEFINED_NIL = 1,
21419 DEFINED_IVAR,
21420 DEFINED_LVAR,
21421 DEFINED_GVAR,
21422 DEFINED_CVAR,
21423 DEFINED_CONST,
21424 DEFINED_METHOD,
21425 DEFINED_YIELD,
21426 DEFINED_ZSUPER,
21427 DEFINED_SELF,
21428 DEFINED_TRUE,
21429 DEFINED_FALSE,
21430 DEFINED_ASGN,
21431 DEFINED_EXPR,
21432 DEFINED_IVAR2,
21433 DEFINED_REF,
21434 DEFINED_FUNC,
21435 DEFINED_CONST_FROM
21436};
21437
21438VALUE rb_iseq_defined_string(enum defined_type type);
21439
21440
21441VALUE rb_iseq_local_variables(const rb_iseq_t *iseq);
21442
21443
21444
21445
21446
21447
21448
21449
21450
21451
21452
21453enum rb_debug_counter_type {
21454
21455RB_DEBUG_COUNTER_mc_inline_hit,
21456RB_DEBUG_COUNTER_mc_inline_miss_klass,
21457RB_DEBUG_COUNTER_mc_inline_miss_invalidated,
21458RB_DEBUG_COUNTER_mc_cme_complement,
21459RB_DEBUG_COUNTER_mc_cme_complement_hit,
21460
21461RB_DEBUG_COUNTER_mc_search,
21462RB_DEBUG_COUNTER_mc_search_notfound,
21463RB_DEBUG_COUNTER_mc_search_super,
21464
21465
21466RB_DEBUG_COUNTER_ci_packed,
21467RB_DEBUG_COUNTER_ci_kw,
21468RB_DEBUG_COUNTER_ci_nokw,
21469RB_DEBUG_COUNTER_ci_runtime,
21470
21471
21472RB_DEBUG_COUNTER_cc_new,
21473RB_DEBUG_COUNTER_cc_temp,
21474RB_DEBUG_COUNTER_cc_found_ccs,
21475
21476RB_DEBUG_COUNTER_cc_ent_invalidate,
21477RB_DEBUG_COUNTER_cc_cme_invalidate,
21478
21479RB_DEBUG_COUNTER_cc_invalidate_leaf,
21480RB_DEBUG_COUNTER_cc_invalidate_leaf_ccs,
21481RB_DEBUG_COUNTER_cc_invalidate_leaf_callable,
21482RB_DEBUG_COUNTER_cc_invalidate_tree,
21483RB_DEBUG_COUNTER_cc_invalidate_tree_cme,
21484RB_DEBUG_COUNTER_cc_invalidate_tree_callable,
21485
21486RB_DEBUG_COUNTER_ccs_free,
21487RB_DEBUG_COUNTER_ccs_maxlen,
21488RB_DEBUG_COUNTER_ccs_found,
21489
21490
21491RB_DEBUG_COUNTER_iseq_num,
21492RB_DEBUG_COUNTER_iseq_cd_num,
21493
21494
21495
21496
21497RB_DEBUG_COUNTER_ccf_general,
21498RB_DEBUG_COUNTER_ccf_iseq_setup,
21499RB_DEBUG_COUNTER_ccf_iseq_setup_0start,
21500RB_DEBUG_COUNTER_ccf_iseq_setup_tailcall_0start,
21501RB_DEBUG_COUNTER_ccf_iseq_fix,
21502RB_DEBUG_COUNTER_ccf_iseq_opt,
21503RB_DEBUG_COUNTER_ccf_iseq_kw1,
21504RB_DEBUG_COUNTER_ccf_iseq_kw2,
21505RB_DEBUG_COUNTER_ccf_cfunc,
21506RB_DEBUG_COUNTER_ccf_cfunc_with_frame,
21507RB_DEBUG_COUNTER_ccf_ivar,
21508RB_DEBUG_COUNTER_ccf_attrset,
21509RB_DEBUG_COUNTER_ccf_method_missing,
21510RB_DEBUG_COUNTER_ccf_zsuper,
21511RB_DEBUG_COUNTER_ccf_bmethod,
21512RB_DEBUG_COUNTER_ccf_opt_send,
21513RB_DEBUG_COUNTER_ccf_opt_call,
21514RB_DEBUG_COUNTER_ccf_opt_block_call,
21515RB_DEBUG_COUNTER_ccf_super_method,
21516RB_DEBUG_COUNTER_frame_push,
21517RB_DEBUG_COUNTER_frame_push_method,
21518RB_DEBUG_COUNTER_frame_push_block,
21519RB_DEBUG_COUNTER_frame_push_class,
21520RB_DEBUG_COUNTER_frame_push_top,
21521RB_DEBUG_COUNTER_frame_push_cfunc,
21522RB_DEBUG_COUNTER_frame_push_ifunc,
21523RB_DEBUG_COUNTER_frame_push_eval,
21524RB_DEBUG_COUNTER_frame_push_rescue,
21525RB_DEBUG_COUNTER_frame_push_dummy,
21526
21527RB_DEBUG_COUNTER_frame_R2R,
21528RB_DEBUG_COUNTER_frame_R2C,
21529RB_DEBUG_COUNTER_frame_C2C,
21530RB_DEBUG_COUNTER_frame_C2R,
21531RB_DEBUG_COUNTER_ivar_get_ic_hit,
21532RB_DEBUG_COUNTER_ivar_get_ic_miss,
21533RB_DEBUG_COUNTER_ivar_get_ic_miss_serial,
21534RB_DEBUG_COUNTER_ivar_get_ic_miss_unset,
21535RB_DEBUG_COUNTER_ivar_get_ic_miss_noobject,
21536RB_DEBUG_COUNTER_ivar_set_ic_hit,
21537RB_DEBUG_COUNTER_ivar_set_ic_miss,
21538RB_DEBUG_COUNTER_ivar_set_ic_miss_serial,
21539RB_DEBUG_COUNTER_ivar_set_ic_miss_unset,
21540RB_DEBUG_COUNTER_ivar_set_ic_miss_oorange,
21541RB_DEBUG_COUNTER_ivar_set_ic_miss_noobject,
21542RB_DEBUG_COUNTER_ivar_get_base,
21543RB_DEBUG_COUNTER_ivar_set_base,
21544RB_DEBUG_COUNTER_lvar_get,
21545RB_DEBUG_COUNTER_lvar_get_dynamic,
21546RB_DEBUG_COUNTER_lvar_set,
21547RB_DEBUG_COUNTER_lvar_set_dynamic,
21548RB_DEBUG_COUNTER_lvar_set_slowpath,
21549RB_DEBUG_COUNTER_gc_count,
21550RB_DEBUG_COUNTER_gc_minor_newobj,
21551RB_DEBUG_COUNTER_gc_minor_malloc,
21552RB_DEBUG_COUNTER_gc_minor_method,
21553RB_DEBUG_COUNTER_gc_minor_capi,
21554RB_DEBUG_COUNTER_gc_minor_stress,
21555RB_DEBUG_COUNTER_gc_major_nofree,
21556RB_DEBUG_COUNTER_gc_major_oldgen,
21557RB_DEBUG_COUNTER_gc_major_shady,
21558RB_DEBUG_COUNTER_gc_major_force,
21559RB_DEBUG_COUNTER_gc_major_oldmalloc,
21560
21561RB_DEBUG_COUNTER_gc_isptr_trial,
21562RB_DEBUG_COUNTER_gc_isptr_range,
21563RB_DEBUG_COUNTER_gc_isptr_align,
21564RB_DEBUG_COUNTER_gc_isptr_maybe,
21565RB_DEBUG_COUNTER_obj_newobj,
21566RB_DEBUG_COUNTER_obj_newobj_slowpath,
21567RB_DEBUG_COUNTER_obj_newobj_wb_unprotected,
21568RB_DEBUG_COUNTER_obj_free,
21569RB_DEBUG_COUNTER_obj_promote,
21570RB_DEBUG_COUNTER_obj_wb_unprotect,
21571
21572RB_DEBUG_COUNTER_obj_obj_embed,
21573RB_DEBUG_COUNTER_obj_obj_transient,
21574RB_DEBUG_COUNTER_obj_obj_ptr,
21575
21576RB_DEBUG_COUNTER_obj_str_ptr,
21577RB_DEBUG_COUNTER_obj_str_embed,
21578RB_DEBUG_COUNTER_obj_str_shared,
21579RB_DEBUG_COUNTER_obj_str_nofree,
21580RB_DEBUG_COUNTER_obj_str_fstr,
21581
21582RB_DEBUG_COUNTER_obj_ary_embed,
21583RB_DEBUG_COUNTER_obj_ary_transient,
21584RB_DEBUG_COUNTER_obj_ary_ptr,
21585RB_DEBUG_COUNTER_obj_ary_extracapa,
21586
21587
21588
21589
21590
21591
21592RB_DEBUG_COUNTER_obj_ary_shared_create,
21593RB_DEBUG_COUNTER_obj_ary_shared,
21594RB_DEBUG_COUNTER_obj_ary_shared_root_occupied,
21595
21596RB_DEBUG_COUNTER_obj_hash_empty,
21597RB_DEBUG_COUNTER_obj_hash_1,
21598RB_DEBUG_COUNTER_obj_hash_2,
21599RB_DEBUG_COUNTER_obj_hash_3,
21600RB_DEBUG_COUNTER_obj_hash_4,
21601RB_DEBUG_COUNTER_obj_hash_5_8,
21602RB_DEBUG_COUNTER_obj_hash_g8,
21603
21604RB_DEBUG_COUNTER_obj_hash_null,
21605RB_DEBUG_COUNTER_obj_hash_ar,
21606RB_DEBUG_COUNTER_obj_hash_st,
21607RB_DEBUG_COUNTER_obj_hash_transient,
21608RB_DEBUG_COUNTER_obj_hash_force_convert,
21609
21610RB_DEBUG_COUNTER_obj_struct_embed,
21611RB_DEBUG_COUNTER_obj_struct_transient,
21612RB_DEBUG_COUNTER_obj_struct_ptr,
21613
21614RB_DEBUG_COUNTER_obj_data_empty,
21615RB_DEBUG_COUNTER_obj_data_xfree,
21616RB_DEBUG_COUNTER_obj_data_imm_free,
21617RB_DEBUG_COUNTER_obj_data_zombie,
21618
21619RB_DEBUG_COUNTER_obj_match_under4,
21620RB_DEBUG_COUNTER_obj_match_ge4,
21621RB_DEBUG_COUNTER_obj_match_ge8,
21622RB_DEBUG_COUNTER_obj_match_ptr,
21623
21624RB_DEBUG_COUNTER_obj_iclass_ptr,
21625RB_DEBUG_COUNTER_obj_class_ptr,
21626RB_DEBUG_COUNTER_obj_module_ptr,
21627
21628RB_DEBUG_COUNTER_obj_bignum_ptr,
21629RB_DEBUG_COUNTER_obj_bignum_embed,
21630RB_DEBUG_COUNTER_obj_float,
21631RB_DEBUG_COUNTER_obj_complex,
21632RB_DEBUG_COUNTER_obj_rational,
21633
21634RB_DEBUG_COUNTER_obj_regexp_ptr,
21635RB_DEBUG_COUNTER_obj_file_ptr,
21636RB_DEBUG_COUNTER_obj_symbol,
21637
21638RB_DEBUG_COUNTER_obj_imemo_ment,
21639RB_DEBUG_COUNTER_obj_imemo_iseq,
21640RB_DEBUG_COUNTER_obj_imemo_env,
21641RB_DEBUG_COUNTER_obj_imemo_tmpbuf,
21642RB_DEBUG_COUNTER_obj_imemo_ast,
21643RB_DEBUG_COUNTER_obj_imemo_cref,
21644RB_DEBUG_COUNTER_obj_imemo_svar,
21645RB_DEBUG_COUNTER_obj_imemo_throw_data,
21646RB_DEBUG_COUNTER_obj_imemo_ifunc,
21647RB_DEBUG_COUNTER_obj_imemo_memo,
21648RB_DEBUG_COUNTER_obj_imemo_parser_strterm,
21649RB_DEBUG_COUNTER_obj_imemo_callinfo,
21650RB_DEBUG_COUNTER_obj_imemo_callcache,
21651
21652
21653RB_DEBUG_COUNTER_artable_hint_hit,
21654RB_DEBUG_COUNTER_artable_hint_miss,
21655RB_DEBUG_COUNTER_artable_hint_notfound,
21656
21657
21658
21659
21660
21661RB_DEBUG_COUNTER_heap_xmalloc,
21662RB_DEBUG_COUNTER_heap_xrealloc,
21663RB_DEBUG_COUNTER_heap_xfree,
21664
21665
21666RB_DEBUG_COUNTER_theap_alloc,
21667RB_DEBUG_COUNTER_theap_alloc_fail,
21668RB_DEBUG_COUNTER_theap_evacuate,
21669
21670
21671RB_DEBUG_COUNTER_mjit_exec,
21672RB_DEBUG_COUNTER_mjit_exec_not_added,
21673RB_DEBUG_COUNTER_mjit_exec_not_ready,
21674RB_DEBUG_COUNTER_mjit_exec_not_compiled,
21675RB_DEBUG_COUNTER_mjit_exec_call_func,
21676
21677
21678RB_DEBUG_COUNTER_mjit_add_iseq_to_process,
21679RB_DEBUG_COUNTER_mjit_unload_units,
21680
21681
21682RB_DEBUG_COUNTER_mjit_frame_VM2VM,
21683RB_DEBUG_COUNTER_mjit_frame_VM2JT,
21684RB_DEBUG_COUNTER_mjit_frame_JT2JT,
21685RB_DEBUG_COUNTER_mjit_frame_JT2VM,
21686
21687
21688RB_DEBUG_COUNTER_mjit_cancel,
21689RB_DEBUG_COUNTER_mjit_cancel_ivar_inline,
21690RB_DEBUG_COUNTER_mjit_cancel_exivar_inline,
21691RB_DEBUG_COUNTER_mjit_cancel_send_inline,
21692RB_DEBUG_COUNTER_mjit_cancel_opt_insn,
21693RB_DEBUG_COUNTER_mjit_cancel_invalidate_all,
21694RB_DEBUG_COUNTER_mjit_cancel_leave,
21695
21696
21697RB_DEBUG_COUNTER_mjit_length_unit_queue,
21698RB_DEBUG_COUNTER_mjit_length_active_units,
21699RB_DEBUG_COUNTER_mjit_length_compact_units,
21700RB_DEBUG_COUNTER_mjit_length_stale_units,
21701
21702
21703RB_DEBUG_COUNTER_mjit_compile_failures,
21704 RB_DEBUG_COUNTER_MAX
21705};
21706
21707
21708void rb_debug_counter_show_results(const char *msg);
21709
21710
21711size_t ruby_debug_counter_get(const char **names_ptr, size_t *counters_ptr);
21712void ruby_debug_counter_reset(void);
21713void ruby_debug_counter_show_at_exit(int enable);
21714
21715
21716
21717
21718
21719
21720enum rb_mjit_iseq_func {
21721
21722 NOT_ADDED_JIT_ISEQ_FUNC = 0,
21723
21724
21725 NOT_READY_JIT_ISEQ_FUNC = 1,
21726
21727
21728 NOT_COMPILED_JIT_ISEQ_FUNC = 2,
21729
21730 LAST_JIT_ISEQ_FUNC = 3
21731};
21732
21733
21734struct mjit_options {
21735
21736
21737 char on;
21738
21739
21740
21741 char save_temps;
21742
21743 char warnings;
21744
21745
21746 char debug;
21747
21748 char* debug_flags;
21749
21750 unsigned int wait;
21751
21752 unsigned int min_calls;
21753
21754
21755 int verbose;
21756
21757
21758 int max_cache_size;
21759};
21760
21761
21762struct rb_mjit_compile_info {
21763
21764 _Bool disable_ivar_cache;
21765
21766 _Bool disable_exivar_cache;
21767
21768 _Bool disable_send_cache;
21769
21770 _Bool disable_inlining;
21771};
21772
21773typedef VALUE (*mjit_func_t)(rb_execution_context_t *, rb_control_frame_t *);
21774
21775extern struct mjit_options mjit_opts;
21776extern _Bool mjit_call_p;
21777
21778extern void rb_mjit_add_iseq_to_process(const rb_iseq_t *iseq);
21779extern VALUE rb_mjit_wait_call(rb_execution_context_t *ec, struct rb_iseq_constant_body *body);
21780extern struct rb_mjit_compile_info* rb_mjit_iseq_compile_info(const struct rb_iseq_constant_body *body);
21781extern void rb_mjit_recompile_send(const rb_iseq_t *iseq);
21782extern void rb_mjit_recompile_ivar(const rb_iseq_t *iseq);
21783extern void rb_mjit_recompile_exivar(const rb_iseq_t *iseq);
21784extern void rb_mjit_recompile_inlining(const rb_iseq_t *iseq);
21785
21786extern _Bool mjit_compile(FILE *f, const rb_iseq_t *iseq, const char *funcname, int id);
21787extern void mjit_init(const struct mjit_options *opts);
21788extern void mjit_gc_start_hook(void);
21789extern void mjit_gc_exit_hook(void);
21790extern void mjit_free_iseq(const rb_iseq_t *iseq);
21791extern void mjit_update_references(const rb_iseq_t *iseq);
21792extern void mjit_mark(void);
21793extern struct mjit_cont *mjit_cont_new(rb_execution_context_t *ec);
21794extern void mjit_cont_free(struct mjit_cont *cont);
21795extern void mjit_add_class_serial(rb_serial_t class_serial);
21796extern void mjit_remove_class_serial(rb_serial_t class_serial);
21797extern void mjit_mark_cc_entries(const struct rb_iseq_constant_body *const body);
21798
21799
21800
21801
21802
21803static inline int
21804mjit_target_iseq_p(struct rb_iseq_constant_body *body)
21805{
21806 return (body->type == ISEQ_TYPE_METHOD || body->type == ISEQ_TYPE_BLOCK)
21807 && !body->builtin_inline_p
21808 && body->iseq_size < 1000;
21809}
21810
21811
21812__declspec(noinline) static __attribute__((__cold__)) VALUE mjit_exec_slowpath(rb_execution_context_t *ec, const rb_iseq_t *iseq, struct rb_iseq_constant_body *body);
21813
21814
21815
21816static VALUE
21817mjit_exec_slowpath(rb_execution_context_t *ec, const rb_iseq_t *iseq, struct rb_iseq_constant_body *body)
21818{
21819 uintptr_t func_i = (uintptr_t)(body->jit_func);
21820 __builtin_assume(func_i <= LAST_JIT_ISEQ_FUNC);
21821 switch ((enum rb_mjit_iseq_func)func_i) {
21822 case NOT_ADDED_JIT_ISEQ_FUNC:
21823 ((void)0);
21824 if (body->total_calls == mjit_opts.min_calls && mjit_target_iseq_p(body)) {
21825 rb_mjit_add_iseq_to_process(iseq);
21826 if ((__builtin_expect(!!(mjit_opts.wait), 0))) {
21827 return rb_mjit_wait_call(ec, body);
21828 }
21829 }
21830 break;
21831 case NOT_READY_JIT_ISEQ_FUNC:
21832 ((void)0);
21833 break;
21834 case NOT_COMPILED_JIT_ISEQ_FUNC:
21835 ((void)0);
21836 break;
21837 default:
21838 break;
21839 }
21840 return ((VALUE)RUBY_Qundef);
21841}
21842
21843
21844
21845static inline VALUE
21846mjit_exec(rb_execution_context_t *ec)
21847{
21848 const rb_iseq_t *iseq;
21849 struct rb_iseq_constant_body *body;
21850
21851 if (!mjit_call_p)
21852 return ((VALUE)RUBY_Qundef);
21853 ((void)0);
21854
21855 iseq = ec->cfp->iseq;
21856 body = iseq->body;
21857 body->total_calls++;
21858
21859 mjit_func_t func = body->jit_func;
21860 if ((__builtin_expect(!!((uintptr_t)func <= LAST_JIT_ISEQ_FUNC), 0))) {
21861
21862 ((void)0);
21863
21864
21865
21866 return mjit_exec_slowpath(ec, iseq, body);
21867 }
21868
21869
21870 ((void)0);
21871
21872
21873
21874 ((void)0);
21875 return func(ec, ec->cfp);
21876}
21877
21878void mjit_child_after_fork(void);
21879
21880
21881
21882
21883
21884
21885
21886
21887
21888
21889typedef struct rb_vm_struct ruby_vm_t;
21890
21891
21893void ruby_vm_at_exit(void(*func)(ruby_vm_t *));
21894
21895
21896
21897
21898enum vm_call_flag_bits {
21899 VM_CALL_ARGS_SPLAT_bit,
21900 VM_CALL_ARGS_BLOCKARG_bit,
21901 VM_CALL_FCALL_bit,
21902 VM_CALL_VCALL_bit,
21903 VM_CALL_ARGS_SIMPLE_bit,
21904 VM_CALL_BLOCKISEQ_bit,
21905 VM_CALL_KWARG_bit,
21906 VM_CALL_KW_SPLAT_bit,
21907 VM_CALL_TAILCALL_bit,
21908 VM_CALL_SUPER_bit,
21909 VM_CALL_ZSUPER_bit,
21910 VM_CALL_OPT_SEND_bit,
21911 VM_CALL_KW_SPLAT_MUT_bit,
21912 VM_CALL__END
21913};
21914
21915
21917 int keyword_len;
21918 VALUE keywords[];
21919};
21920
21921static inline size_t
21922rb_callinfo_kwarg_bytes(int keyword_len)
21923{
21924 return rb_size_mul_add_or_raise(
21925 keyword_len,
21926 sizeof(VALUE),
21927 sizeof(struct rb_callinfo_kwarg),
21928 rb_eRuntimeError);
21929}
21930
21931
21933 VALUE flags;
21934 const struct rb_callinfo_kwarg *kwarg;
21935 VALUE mid;
21936 VALUE flag;
21937 VALUE argc;
21938};
21939
21940
21941
21942
21943
21944
21945static inline _Bool
21946vm_ci_packed_p(const struct rb_callinfo *ci)
21947{
21948
21949 if ((__builtin_expect(!!(((VALUE)ci) & 0x01), 1))) {
21950 return 1;
21951 }
21952 else {
21953 ((void)0);
21954 return 0;
21955 }
21956
21957
21958
21959}
21960
21961static inline _Bool
21962vm_ci_p(const struct rb_callinfo *ci)
21963{
21964 if (vm_ci_packed_p(ci) || imemo_type_p((VALUE)ci, imemo_callinfo)) {
21965 return 1;
21966 }
21967 else {
21968 return 0;
21969 }
21970}
21971
21972static inline ID
21973vm_ci_mid(const struct rb_callinfo *ci)
21974{
21975 if (vm_ci_packed_p(ci)) {
21976 return (((VALUE)ci) >> (1 + 15 + 16)) & ((((VALUE)1)<<32) - 1);
21977 }
21978 else {
21979 return (ID)ci->mid;
21980 }
21981}
21982
21983static inline unsigned int
21984vm_ci_flag(const struct rb_callinfo *ci)
21985{
21986 if (vm_ci_packed_p(ci)) {
21987 return (unsigned int)((((VALUE)ci) >> (1 + 15)) & ((((VALUE)1)<<16) - 1));
21988 }
21989 else {
21990 return (unsigned int)ci->flag;
21991 }
21992}
21993
21994static inline unsigned int
21995vm_ci_argc(const struct rb_callinfo *ci)
21996{
21997 if (vm_ci_packed_p(ci)) {
21998 return (unsigned int)((((VALUE)ci) >> (1)) & ((((VALUE)1)<<15) - 1));
21999 }
22000 else {
22001 return (unsigned int)ci->argc;
22002 }
22003}
22004
22005static inline const struct rb_callinfo_kwarg *
22006vm_ci_kwarg(const struct rb_callinfo *ci)
22007{
22008 if (vm_ci_packed_p(ci)) {
22009 return ((void*)0);
22010 }
22011 else {
22012 return ci->kwarg;
22013 }
22014}
22015
22016static inline void
22017vm_ci_dump(const struct rb_callinfo *ci)
22018{
22019 if (vm_ci_packed_p(ci)) {
22020 __fprintf_chk (stderr, 2 - 1, "packed_ci ID:%s flag:%x argc:%u\n", rb_id2name(vm_ci_mid(ci)), vm_ci_flag(ci), vm_ci_argc(ci));
22021
22022 }
22023 else {
22024 rb_obj_info_dump_loc((VALUE)(ci), "./vm_callinfo.h", 176, __func__);
22025 }
22026}
22027
22028
22029
22030
22031
22032
22033
22034
22035
22036
22037
22038
22039
22040
22041static inline const struct rb_callinfo *
22042vm_ci_new_(ID mid, unsigned int flag, unsigned int argc, const struct rb_callinfo_kwarg *kwarg, const char *file, int line)
22043{
22044
22045 if ((((mid ) & ~((((VALUE)1)<<32) - 1)) ? 0 : ((flag) & ~((((VALUE)1)<<16) - 1)) ? 0 : ((argc) & ~((((VALUE)1)<<15) - 1)) ? 0 : (kwarg) ? 0 : 1)) {
22046 ((void)0);
22047 return ((const struct rb_callinfo *) ((((VALUE)(mid )) << (1 + 15 + 16)) | (((VALUE)(flag)) << (1 + 15)) | (((VALUE)(argc)) << (1)) | RUBY_FIXNUM_FLAG));
22048 }
22049
22050
22051 const _Bool debug = 0;
22052 if (debug) __fprintf_chk (stderr, 2 - 1, "%s:%d ", file, line);
22053
22054
22055 const struct rb_callinfo *ci = (const struct rb_callinfo *)
22056 rb_imemo_new(imemo_callinfo,
22057 (VALUE)mid,
22058 (VALUE)flag,
22059 (VALUE)argc,
22060 (VALUE)kwarg);
22061 if (debug) rb_obj_info_dump_loc((VALUE)(ci), "./vm_callinfo.h", 217, __func__);
22062 if (kwarg) {
22063 ((void)0);
22064 }
22065 else {
22066 ((void)0);
22067 }
22068
22069 ((void)0);
22070 ((void)0);
22071
22072 return ci;
22073}
22074
22075
22076static inline const struct rb_callinfo *
22077vm_ci_new_runtime_(ID mid, unsigned int flag, unsigned int argc, const struct rb_callinfo_kwarg *kwarg, const char *file, int line)
22078{
22079 ((void)0);
22080 return vm_ci_new_(mid, flag, argc, kwarg, file, line);
22081}
22082
22083
22084static inline _Bool
22085vm_ci_markable(const struct rb_callinfo *ci)
22086{
22087 if (! ci) {
22088 return 0;
22089 }
22090 else if (vm_ci_packed_p(ci)) {
22091 return 1;
22092 }
22093 else {
22094 ((void)0);
22095 return ! RB_FL_ANY_RAW((VALUE)ci, ((VALUE)RUBY_FL_USER4));
22096 }
22097}
22098
22099typedef VALUE (*vm_call_handler)(
22100 struct rb_execution_context_struct *ec,
22101 struct rb_control_frame_struct *cfp,
22102 struct rb_calling_info *calling,
22103 struct rb_call_data *cd);
22104
22105
22106
22108 const VALUE flags;
22109
22110
22111 const VALUE klass;
22112
22113
22114
22115
22116 const struct rb_callable_method_entry_struct * const cme_;
22117 const vm_call_handler call_;
22118
22119 union {
22120 const unsigned int attr_index;
22121 const enum method_missing_reason method_missing_reason;
22122 VALUE v;
22123 } aux_;
22124};
22125
22126
22127static inline const struct rb_callcache *
22128vm_cc_new(VALUE klass,
22129 const struct rb_callable_method_entry_struct *cme,
22130 vm_call_handler call)
22131{
22132 const struct rb_callcache *cc = (const struct rb_callcache *)rb_imemo_new(imemo_callcache, (VALUE)cme, (VALUE)call, 0, klass);
22133 ((void)0);
22134 return cc;
22135}
22136
22137static inline _Bool
22138vm_cc_class_check(const struct rb_callcache *cc, VALUE klass)
22139{
22140 ((void)0);
22141 ((void)0);
22142
22143 return cc->klass == klass;
22144}
22145
22146static inline const struct rb_callable_method_entry_struct *
22147vm_cc_cme(const struct rb_callcache *cc)
22148{
22149 ((void)0);
22150 return cc->cme_;
22151}
22152
22153static inline vm_call_handler
22154vm_cc_call(const struct rb_callcache *cc)
22155{
22156 ((void)0);
22157 return cc->call_;
22158}
22159
22160static inline unsigned int
22161vm_cc_attr_index(const struct rb_callcache *cc)
22162{
22163 ((void)0);
22164 return cc->aux_.attr_index;
22165}
22166
22167static inline unsigned int
22168vm_cc_cmethod_missing_reason(const struct rb_callcache *cc)
22169{
22170 ((void)0);
22171 return cc->aux_.method_missing_reason;
22172}
22173
22174static inline int
22175vm_cc_markable(const struct rb_callcache *cc)
22176{
22177 ((void)0);
22178 return RB_FL_TEST_RAW((VALUE)cc, ((VALUE)RUBY_FL_USER4)) == 0;
22179}
22180
22181
22182static inline _Bool
22183vm_cc_valid_p(const struct rb_callcache *cc, const rb_callable_method_entry_t *cc_cme, VALUE klass)
22184{
22185 ((void)0);
22186 if (cc->klass == klass && !((cc_cme)->flags & ((VALUE)RUBY_FL_USER9))) {
22187 return 1;
22188 }
22189 else {
22190 return 0;
22191 }
22192}
22193
22194extern const struct rb_callcache *rb_vm_empty_cc(void);
22195
22196
22197
22198static inline void
22199vm_cc_cme_set(const struct rb_callcache *cc, const struct rb_callable_method_entry_struct *cme)
22200{
22201 ((void)0);
22202 ((void)0);
22203 ((void)0);
22204 ((void)0);
22205 ((void)0);
22206
22207 *((const struct rb_callable_method_entry_struct **)&cc->cme_) = cme;
22208}
22209
22210static inline void
22211vm_cc_call_set(const struct rb_callcache *cc, vm_call_handler call)
22212{
22213 ((void)0);
22214 ((void)0);
22215 *(vm_call_handler *)&cc->call_ = call;
22216}
22217
22218static inline void
22219vm_cc_attr_index_set(const struct rb_callcache *cc, int index)
22220{
22221 ((void)0);
22222 ((void)0);
22223 *(int *)&cc->aux_.attr_index = index;
22224}
22225
22226static inline void
22227vm_cc_method_missing_reason_set(const struct rb_callcache *cc, enum method_missing_reason reason)
22228{
22229 ((void)0);
22230 ((void)0);
22231 *(enum method_missing_reason *)&cc->aux_.method_missing_reason = reason;
22232}
22233
22234static inline void
22235vm_cc_invalidate(const struct rb_callcache *cc)
22236{
22237 ((void)0);
22238 ((void)0);
22239 ((void)0);
22240
22241 *(VALUE *)&cc->klass = 0;
22242 ((void)0);
22243}
22244
22245
22246
22247struct rb_call_data {
22248 const struct rb_callinfo *ci;
22249 const struct rb_callcache *cc;
22250};
22251
22253
22254
22255
22256 int capa;
22257 int len;
22258 const struct rb_callable_method_entry_struct *cme;
22260 const struct rb_callinfo *ci;
22261 const struct rb_callcache *cc;
22262 } *entries;
22263};
22264void rb_vm_ccs_free(struct rb_class_cc_entries *ccs);
22265
22266
22267
22268VALUE ruby_debug_print_value(int level, int debug_level, const char *header, VALUE v);
22269ID ruby_debug_print_id(int level, int debug_level, const char *header, ID id);
22270NODE *ruby_debug_print_node(int level, int debug_level, const char *header, const NODE *node);
22271int ruby_debug_print_indent(int level, int debug_level, int indent_level);
22272void ruby_debug_gc_check_func(void);
22273void ruby_set_debug_option(const char *str);
22274
22275
22276
22277
22278extern enum ruby_debug_log_mode {
22279 ruby_debug_log_disabled = 0x00,
22280 ruby_debug_log_memory = 0x01,
22281 ruby_debug_log_stderr = 0x02,
22282 ruby_debug_log_file = 0x04,
22283} ruby_debug_log_mode;
22284
22285void ruby_debug_log(const char *file, int line, const char *func_name, const char *fmt, ...);
22286void ruby_debug_log_print(unsigned int n);
22287_Bool ruby_debug_log_filter(const char *func_name);
22288
22289
22290
22291
22292typedef long OFFSET;
22293typedef unsigned long lindex_t;
22294typedef VALUE GENTRY;
22295typedef rb_iseq_t *ISEQ;
22296
22297
22298
22299
22300
22301
22302
22303
22304
22305
22306
22307
22308
22309
22310
22311
22312
22313
22314
22315
22316
22317
22318
22319
22320
22321
22322
22323
22324
22325
22326
22327
22328
22329
22330
22331
22332
22333
22334
22335
22336
22337
22338extern VALUE ruby_vm_const_missing_count;
22339extern rb_serial_t ruby_vm_global_method_state;
22340extern rb_serial_t ruby_vm_global_constant_state;
22341extern rb_serial_t ruby_vm_class_serial;
22342
22343
22344
22345
22346
22347
22348
22349
22350
22351
22352
22353
22354
22355
22356
22357
22358
22359
22360
22361
22362
22363
22364
22365
22366
22367
22368
22369
22370
22371
22372
22373
22374
22375
22376
22377
22378
22379
22380
22381
22382static inline void
22383CC_SET_FASTPATH(const struct rb_callcache *cc, vm_call_handler func, _Bool enabled)
22384{
22385 if ((__builtin_expect(!!(enabled), 1))) {
22386 vm_cc_call_set(cc, func);
22387 }
22388}
22389
22390
22391static inline struct vm_throw_data *
22392THROW_DATA_NEW(VALUE val, const rb_control_frame_t *cf, int st)
22393{
22394 struct vm_throw_data *obj = (struct vm_throw_data *)rb_imemo_new(imemo_throw_data, val, (VALUE)cf, 0, 0);
22395 obj->throw_state = st;
22396 return obj;
22397}
22398
22399static inline VALUE
22400THROW_DATA_VAL(const struct vm_throw_data *obj)
22401{
22402 ((void)0);
22403 return obj->throw_obj;
22404}
22405
22406static inline const rb_control_frame_t *
22407THROW_DATA_CATCH_FRAME(const struct vm_throw_data *obj)
22408{
22409 ((void)0);
22410 return obj->catch_frame;
22411}
22412
22413static inline int
22414THROW_DATA_STATE(const struct vm_throw_data *obj)
22415{
22416 ((void)0);
22417 return obj->throw_state;
22418}
22419
22420static inline int
22421THROW_DATA_CONSUMED_P(const struct vm_throw_data *obj)
22422{
22423 ((void)0);
22424 return obj->flags & ((VALUE)RUBY_FL_USER4);
22425}
22426
22427static inline void
22428THROW_DATA_CATCH_FRAME_SET(struct vm_throw_data *obj, const rb_control_frame_t *cfp)
22429{
22430 ((void)0);
22431 obj->catch_frame = cfp;
22432}
22433
22434static inline void
22435THROW_DATA_STATE_SET(struct vm_throw_data *obj, int st)
22436{
22437 ((void)0);
22438 obj->throw_state = st;
22439}
22440
22441static inline void
22442THROW_DATA_CONSUMED_SET(struct vm_throw_data *obj)
22443{
22444 if (imemo_throw_data_p((VALUE)obj) &&
22445 THROW_DATA_STATE(obj) == RUBY_TAG_BREAK) {
22446 obj->flags |= ((VALUE)RUBY_FL_USER4);
22447 }
22448}
22449
22450
22451
22452
22453static _Bool
22454vm_call_iseq_optimizable_p(const struct rb_callinfo *ci, const struct rb_callcache *cc)
22455{
22456 return !(vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !(vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit)) &&
22457 !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED);
22458}
22459
22460
22461
22462
22463
22464struct rb_builtin_function {
22465
22466 const void * const func_ptr;
22467 const int argc;
22468
22469
22470 const int index;
22471 const char * const name;
22472
22473
22474 void (*compiler)(FILE *, long, unsigned, _Bool);
22475};
22476
22477
22478
22479
22480
22481
22482
22483
22484void rb_load_with_builtin_functions(const char *feature_name, const struct rb_builtin_function *table);
22485static inline void rb_builtin_function_check_arity0(VALUE (*f)(rb_execution_context_t *ec, VALUE self)){}
22486static inline void rb_builtin_function_check_arity1(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE)){}
22487static inline void rb_builtin_function_check_arity2(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE)){}
22488static inline void rb_builtin_function_check_arity3(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE)){}
22489static inline void rb_builtin_function_check_arity4(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE)){}
22490static inline void rb_builtin_function_check_arity5(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE)){}
22491static inline void rb_builtin_function_check_arity6(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
22492static inline void rb_builtin_function_check_arity7(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
22493static inline void rb_builtin_function_check_arity8(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
22494static inline void rb_builtin_function_check_arity9(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
22495static inline void rb_builtin_function_check_arity10(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
22496static inline void rb_builtin_function_check_arity11(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
22497static inline void rb_builtin_function_check_arity12(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
22498static inline void rb_builtin_function_check_arity13(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
22499static inline void rb_builtin_function_check_arity14(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}
22500static inline void rb_builtin_function_check_arity15(VALUE (*f)(rb_execution_context_t *ec, VALUE self, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE)){}static inline
22501
22502VALUE rb_vm_lvar_exposed(rb_execution_context_t *ec, int index);
22503
22504
22505
22506__attribute__((__pure__)) static inline VALUE rb_vm_lvar(rb_execution_context_t *ec, int index);
22507
22508static inline VALUE
22509rb_vm_lvar(rb_execution_context_t *ec, int index)
22510{
22511
22512 return ec->cfp->ep[index];
22513
22514
22515
22516}
22517
22518
22519
22520struct builtin_binary {
22521 const char *feature;
22522 const unsigned char *bin;
22523 size_t bin_size;
22524};
22525
22526
22527
22528
22529
22530
22531
22532
22533
22534
22535
22536
22537
22538
22539
22540
22541
22542
22543
22544
22545
22546
22547
22548
22549
22550
22551
22552
22553
22554
22555
22556
22557
22558
22560 const char *classname;
22561 const char *methodname;
22562 const char *filename;
22563 int line_no;
22564 volatile VALUE klass;
22565 volatile VALUE name;
22566};
22567
22568__declspec(noinline) int rb_dtrace_setup(rb_execution_context_t *, VALUE, ID, struct ruby_dtrace_method_hook_args *);
22569
22570
22571
22572
22573
22574
22575
22576
22577VALUE rb_str_concat_literals(size_t, const VALUE*);
22578__attribute__ ((__visibility__("default"))) extern
22579
22580VALUE rb_vm_exec(rb_execution_context_t *, int);
22581
22582__attribute__((__pure__)) static inline const VALUE *VM_EP_LEP(const VALUE *);
22583static inline const VALUE *
22584VM_EP_LEP(const VALUE *ep)
22585{
22586 while (!VM_ENV_LOCAL_P(ep)) {
22587 ep = VM_ENV_PREV_EP(ep);
22588 }
22589 return ep;
22590}
22591
22592static inline const rb_control_frame_t *
22593rb_vm_search_cf_from_ep(const rb_execution_context_t *ec, const rb_control_frame_t *cfp, const VALUE * const ep)
22594{
22595 if (!ep) {
22596 return ((void*)0);
22597 }
22598 else {
22599 const rb_control_frame_t * const eocfp = RUBY_VM_END_CONTROL_FRAME(ec);
22600
22601 while (cfp < eocfp) {
22602 if (cfp->ep == ep) {
22603 return cfp;
22604 }
22605 cfp = ((cfp)+1);
22606 }
22607
22608 return ((void*)0);
22609 }
22610}static inline
22611
22612const VALUE *
22613rb_vm_ep_local_ep(const VALUE *ep)
22614{
22615 return VM_EP_LEP(ep);
22616}
22617
22618__attribute__((__pure__)) static inline const VALUE *VM_CF_LEP(const rb_control_frame_t * const cfp);
22619static inline const VALUE *
22620VM_CF_LEP(const rb_control_frame_t * const cfp)
22621{
22622 return VM_EP_LEP(cfp->ep);
22623}
22624
22625static inline const VALUE *
22626VM_CF_PREV_EP(const rb_control_frame_t * const cfp)
22627{
22628 return VM_ENV_PREV_EP(cfp->ep);
22629}
22630
22631__attribute__((__pure__)) static inline VALUE VM_CF_BLOCK_HANDLER(const rb_control_frame_t * const cfp);
22632static inline VALUE
22633VM_CF_BLOCK_HANDLER(const rb_control_frame_t * const cfp)
22634{
22635 const VALUE *ep = VM_CF_LEP(cfp);
22636 return VM_ENV_BLOCK_HANDLER(ep);
22637}static inline
22638
22639int
22640rb_vm_cframe_keyword_p(const rb_control_frame_t *cfp)
22641{
22642 return VM_FRAME_CFRAME_KW_P(cfp);
22643}static inline
22644
22645VALUE
22646rb_vm_frame_block_handler(const rb_control_frame_t *cfp)
22647{
22648 return VM_CF_BLOCK_HANDLER(cfp);
22649}
22650static struct rb_captured_block *
22651VM_CFP_TO_CAPTURED_BLOCK(const rb_control_frame_t *cfp)
22652{
22653 ((void)0);
22654 return (struct rb_captured_block *)&cfp->self;
22655}
22656
22657static rb_control_frame_t *
22658VM_CAPTURED_BLOCK_TO_CFP(const struct rb_captured_block *captured)
22659{
22660 rb_control_frame_t *cfp = ((rb_control_frame_t *)((VALUE *)(captured) - 3));
22661 ((void)0);
22662 ((void)0);
22663 return cfp;
22664}
22665
22666static int
22667VM_BH_FROM_CFP_P(VALUE block_handler, const rb_control_frame_t *cfp)
22668{
22669 const struct rb_captured_block *captured = VM_CFP_TO_CAPTURED_BLOCK(cfp);
22670 return ((void *)((block_handler) & ~0x03)) == captured;
22671}
22672
22673static VALUE
22674vm_passed_block_handler(rb_execution_context_t *ec)
22675{
22676 VALUE block_handler = ec->passed_block_handler;
22677 ec->passed_block_handler = 0;
22678 vm_block_handler_verify(block_handler);
22679 return block_handler;
22680}
22681
22682static rb_cref_t *
22683vm_cref_new0(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval, int use_prev_prev)
22684{
22685 VALUE refinements = ((VALUE)RUBY_Qnil);
22686 int omod_shared = 0;
22687 rb_cref_t *cref;
22688
22689
22690 union {
22692 VALUE value;
22693 } scope_visi;
22694
22695 scope_visi.visi.method_visi = visi;
22696 scope_visi.visi.module_func = module_func;
22697
22698
22699 if (prev_cref != ((void*)0) && prev_cref != (void *)1 ) {
22700 refinements = CREF_REFINEMENTS(prev_cref);
22701
22702 if (!RB_NIL_P(refinements)) {
22703 omod_shared = 1;
22704 CREF_OMOD_SHARED_SET(prev_cref);
22705 }
22706 }
22707
22708 cref = (rb_cref_t *)rb_imemo_new(imemo_cref, klass, (VALUE)(use_prev_prev ? CREF_NEXT(prev_cref) : prev_cref), scope_visi.value, refinements);
22709
22710 if (pushed_by_eval) CREF_PUSHED_BY_EVAL_SET(cref);
22711 if (omod_shared) CREF_OMOD_SHARED_SET(cref);
22712
22713 return cref;
22714}
22715
22716static rb_cref_t *
22717vm_cref_new(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval)
22718{
22719 return vm_cref_new0(klass, visi, module_func, prev_cref, pushed_by_eval, 0);
22720}
22721
22722static rb_cref_t *
22723vm_cref_new_use_prev(VALUE klass, rb_method_visibility_t visi, int module_func, rb_cref_t *prev_cref, int pushed_by_eval)
22724{
22725 return vm_cref_new0(klass, visi, module_func, prev_cref, pushed_by_eval, 1);
22726}
22727
22728static int
22729ref_delete_symkey(VALUE key, VALUE value, VALUE unused)
22730{
22731 return RB_SYMBOL_P(key) ? ST_DELETE : ST_CONTINUE;
22732}
22733
22734static rb_cref_t *
22735vm_cref_dup(const rb_cref_t *cref)
22736{
22737 VALUE klass = CREF_CLASS(cref);
22738 const rb_scope_visibility_t *visi = CREF_SCOPE_VISI(cref);
22739 rb_cref_t *next_cref = CREF_NEXT(cref), *new_cref;
22740 int pushed_by_eval = CREF_PUSHED_BY_EVAL(cref);
22741
22742 new_cref = vm_cref_new(klass, visi->method_visi, visi->module_func, next_cref, pushed_by_eval);
22743
22744 if (!RB_NIL_P(CREF_REFINEMENTS(cref))) {
22745 VALUE ref = rb_hash_dup(CREF_REFINEMENTS(cref));
22746 rb_hash_foreach(ref, ref_delete_symkey, ((VALUE)RUBY_Qnil));
22747 CREF_REFINEMENTS_SET(new_cref, ref);
22748 CREF_OMOD_SHARED_UNSET(new_cref);
22749 }
22750
22751 return new_cref;
22752}
22753
22754static rb_cref_t *
22755vm_cref_new_toplevel(rb_execution_context_t *ec)
22756{
22757 rb_cref_t *cref = vm_cref_new(rb_cObject, METHOD_VISI_PRIVATE , 0, ((void*)0), 0);
22758 VALUE top_wrapper = rb_ec_thread_ptr(ec)->top_wrapper;
22759
22760 if (top_wrapper) {
22761 cref = vm_cref_new(top_wrapper, METHOD_VISI_PRIVATE, 0, cref, 0);
22762 }
22763
22764 return cref;
22765}static inline
22766
22767rb_cref_t *
22768rb_vm_cref_new_toplevel(void)
22769{
22770 return vm_cref_new_toplevel(rb_current_execution_context());
22771}
22772
22773static void
22774vm_cref_dump(const char *mesg, const rb_cref_t *cref)
22775{
22776 __fprintf_chk (stderr, 2 - 1, "vm_cref_dump: %s (%p)\n", mesg, (void *)cref);
22777
22778 while (cref) {
22779 __fprintf_chk (stderr, 2 - 1, "= cref| klass: %s\n", RSTRING_PTR(rb_class_path(CREF_CLASS(cref))));
22780 cref = CREF_NEXT(cref);
22781 }
22782}static inline
22783
22784void
22785rb_vm_block_ep_update(VALUE obj, const struct rb_block *dst, const VALUE *ep)
22786{
22787 *((const VALUE **)&dst->as.captured.ep) = ep;
22788 (rb_obj_written((VALUE)(obj), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(VM_ENV_ENVVAL(ep)), "./vm.c", 327));
22789}
22790
22791static void
22792vm_bind_update_env(VALUE bindval, rb_binding_t *bind, VALUE envval)
22793{
22794 const rb_env_t *env = (rb_env_t *)envval;
22795 __extension__({
22796;
22797; __typeof__(rb_obj_write((VALUE)(bindval), (VALUE *)(&bind->block.as.captured.code.iseq), (VALUE)(env->iseq), "./vm.c", 334)) unaligned_member_access_result = (rb_obj_write((VALUE)(bindval), (VALUE *)(&bind->block.as.captured.code.iseq), (VALUE)(env->iseq), "./vm.c", 334));
22798; unaligned_member_access_result; });
22799 rb_vm_block_ep_update(bindval, &bind->block, env->ep);
22800}
22801
22802
22803
22804
22805
22806
22807
22808static VALUE vm_make_env_object(const rb_execution_context_t *ec, rb_control_frame_t *cfp);
22809extern VALUE rb_vm_invoke_bmethod(rb_execution_context_t *ec, rb_proc_t *proc, VALUE self,
22810 int argc, const VALUE *argv, int kw_splat, VALUE block_handler,
22811 const rb_callable_method_entry_t *me);
22812static VALUE vm_invoke_proc(rb_execution_context_t *ec, rb_proc_t *proc, VALUE self, int argc, const VALUE *argv, int kw_splat, VALUE block_handler);
22813
22814
22815
22816typedef enum {
22817 CONST_DEPRECATED = 0x100,
22818
22819 CONST_VISIBILITY_MASK = 0xff,
22820 CONST_PUBLIC = 0x00,
22821 CONST_PRIVATE,
22822 CONST_VISIBILITY_MAX
22823} rb_const_flag_t;
22824
22825
22826
22827
22828
22829
22830typedef struct rb_const_entry_struct {
22831 rb_const_flag_t flag;
22832 int line;
22833 VALUE value;
22834 VALUE file;
22836
22837VALUE rb_mod_private_constant(int argc, const VALUE *argv, VALUE obj);
22838VALUE rb_mod_public_constant(int argc, const VALUE *argv, VALUE obj);
22839VALUE rb_mod_deprecate_constant(int argc, const VALUE *argv, VALUE obj);
22840void rb_free_const_table(struct rb_id_table *tbl);
22841VALUE rb_const_source_location(VALUE, ID);
22842
22843int rb_autoloading_value(VALUE mod, ID id, VALUE *value, rb_const_flag_t *flag);
22844rb_const_entry_t *rb_const_lookup(VALUE klass, ID id);
22845VALUE rb_public_const_get_at(VALUE klass, ID id);
22846VALUE rb_public_const_get_from(VALUE klass, ID id);
22847int rb_public_const_defined_from(VALUE klass, ID id);
22848VALUE rb_const_source_location_at(VALUE, ID);
22849
22850
22851
22852
22853enum {
22854 cmp_opt_Integer,
22855 cmp_opt_String,
22856 cmp_opt_Float,
22857 cmp_optimizable_count
22858};
22859
22860struct cmp_opt_data {
22861 unsigned int opt_methods;
22862 unsigned int opt_inited;
22863};
22864
22865
22866
22867
22868
22869
22870
22871
22872VALUE rb_invcmp(VALUE, VALUE);
22873
22874
22875
22876
22877
22878
22879struct ar_table_struct;
22880typedef unsigned char ar_hint_t;
22881
22882enum ruby_rhash_flags {
22883 RHASH_PASS_AS_KEYWORDS = ((VALUE)RUBY_FL_USER1),
22884 RHASH_PROC_DEFAULT = ((VALUE)RUBY_FL_USER2),
22885 RHASH_ST_TABLE_FLAG = ((VALUE)RUBY_FL_USER3),
22886 RHASH_AR_TABLE_SIZE_MASK = (((VALUE)RUBY_FL_USER4)|((VALUE)RUBY_FL_USER5)|((VALUE)RUBY_FL_USER6)|((VALUE)RUBY_FL_USER7)),
22887 RHASH_AR_TABLE_SIZE_SHIFT = (((VALUE)RUBY_FL_USHIFT)+4),
22888 RHASH_AR_TABLE_BOUND_MASK = (((VALUE)RUBY_FL_USER8)|((VALUE)RUBY_FL_USER9)|((VALUE)RUBY_FL_USER10)|((VALUE)RUBY_FL_USER11)),
22889 RHASH_AR_TABLE_BOUND_SHIFT = (((VALUE)RUBY_FL_USHIFT)+8),
22890
22891
22892 RHASH_TRANSIENT_FLAG = ((VALUE)RUBY_FL_USER12),
22893
22894
22895
22896
22897
22898 RHASH_LEV_SHIFT = (((VALUE)RUBY_FL_USHIFT) + 13),
22899 RHASH_LEV_MAX = 127,
22900};
22901
22902struct RHash {
22903 struct RBasic basic;
22904 union {
22905 st_table *st;
22906 struct ar_table_struct *ar;
22907 } as;
22908 const VALUE ifnone;
22909 union {
22910 ar_hint_t ary[8];
22911 VALUE word;
22912 } ar_hint;
22913};
22914
22915void rb_hash_st_table_set(VALUE hash, st_table *st);
22916VALUE rb_hash_default_value(VALUE hash, VALUE key);
22917VALUE rb_hash_set_default_proc(VALUE hash, VALUE proc);
22918long rb_dbl_long_hash(double d);
22919st_table *rb_init_identtable(void);
22920VALUE rb_to_hash_type(VALUE obj);
22921VALUE rb_hash_key_str(VALUE);
22922VALUE rb_hash_values(VALUE hash);
22923VALUE rb_hash_rehash(VALUE hash);
22924int rb_hash_add_new_element(VALUE hash, VALUE key, VALUE val);
22925VALUE rb_hash_set_pair(VALUE hash, VALUE pair);
22926int rb_hash_stlike_delete(VALUE hash, st_data_t *pkey, st_data_t *pval);
22927int rb_hash_stlike_foreach_with_replace(VALUE hash, st_foreach_check_callback_func *func, st_update_callback_func *replace, st_data_t arg);
22928int rb_hash_stlike_update(VALUE hash, st_data_t key, st_update_callback_func *func, st_data_t arg);
22929static inline unsigned RHASH_AR_TABLE_SIZE_RAW(VALUE h);
22930static inline VALUE RHASH_IFNONE(VALUE h);
22931static inline size_t RHASH_SIZE(VALUE h);
22932static inline _Bool RHASH_EMPTY_P(VALUE h);
22933static inline _Bool RHASH_AR_TABLE_P(VALUE h);
22934static inline _Bool RHASH_ST_TABLE_P(VALUE h);
22935static inline struct ar_table_struct *RHASH_AR_TABLE(VALUE h);
22936static inline st_table *RHASH_ST_TABLE(VALUE h);
22937static inline size_t RHASH_ST_SIZE(VALUE h);
22938static inline void RHASH_ST_CLEAR(VALUE h);
22939static inline _Bool RHASH_TRANSIENT_P(VALUE h);
22940static inline void RHASH_SET_TRANSIENT_FLAG(VALUE h);
22941static inline void RHASH_UNSET_TRANSIENT_FLAG(VALUE h);
22942
22943
22944VALUE rb_hash_delete_entry(VALUE hash, VALUE key);
22945VALUE rb_ident_hash_new(void);
22946int rb_hash_stlike_foreach(VALUE hash, st_foreach_callback_func *func, st_data_t arg);
22947
22948VALUE rb_hash_new_with_size(st_index_t size);
22949VALUE rb_hash_resurrect(VALUE hash);
22950int rb_hash_stlike_lookup(VALUE hash, st_data_t key, st_data_t *pval);
22951VALUE rb_hash_keys(VALUE hash);
22952VALUE rb_hash_has_key(VALUE hash, VALUE key);
22953VALUE rb_hash_compare_by_id_p(VALUE hash);
22954
22955st_table *rb_hash_tbl_raw(VALUE hash, const char *file, int line);
22956static inline _Bool
22957RHASH_AR_TABLE_P(VALUE h)
22958{
22959 return ! RB_FL_TEST_RAW(h, RHASH_ST_TABLE_FLAG);
22960}
22961
22962static inline struct ar_table_struct *
22963RHASH_AR_TABLE(VALUE h)
22964{
22965 return ((struct RHash*)(h))->as.ar;
22966}
22967
22968static inline st_table *
22969RHASH_ST_TABLE(VALUE h)
22970{
22971 return ((struct RHash*)(h))->as.st;
22972}
22973
22974
22975
22976static inline VALUE
22977RHASH_IFNONE(VALUE h)
22978{
22979 return ((struct RHash*)(h))->ifnone;
22980}
22981
22982static inline size_t
22983RHASH_SIZE(VALUE h)
22984{
22985 if (RHASH_AR_TABLE_P(h)) {
22986 return RHASH_AR_TABLE_SIZE_RAW(h);
22987 }
22988 else {
22989 return RHASH_ST_SIZE(h);
22990 }
22991}
22992
22993static inline _Bool
22994RHASH_EMPTY_P(VALUE h)
22995{
22996 return RHASH_SIZE(h) == 0;
22997}
22998
22999static inline _Bool
23000RHASH_ST_TABLE_P(VALUE h)
23001{
23002 return ! RHASH_AR_TABLE_P(h);
23003}
23004
23005static inline size_t
23006RHASH_ST_SIZE(VALUE h)
23007{
23008 return RHASH_ST_TABLE(h)->num_entries;
23009}
23010
23011static inline void
23012RHASH_ST_CLEAR(VALUE h)
23013{
23014 RB_FL_UNSET_RAW(h, RHASH_ST_TABLE_FLAG);
23015 ((struct RHash*)(h))->as.ar = ((void*)0);
23016}
23017
23018static inline unsigned
23019RHASH_AR_TABLE_SIZE_RAW(VALUE h)
23020{
23021 VALUE ret = RB_FL_TEST_RAW(h, RHASH_AR_TABLE_SIZE_MASK);
23022 ret >>= RHASH_AR_TABLE_SIZE_SHIFT;
23023 return (unsigned)ret;
23024}
23025
23026static inline _Bool
23027RHASH_TRANSIENT_P(VALUE h)
23028{
23029
23030 return RB_FL_TEST_RAW(h, RHASH_TRANSIENT_FLAG);
23031
23032
23033
23034}
23035
23036static inline void
23037RHASH_SET_TRANSIENT_FLAG(VALUE h)
23038{
23039
23040 RB_FL_SET_RAW(h, RHASH_TRANSIENT_FLAG);
23041
23042}
23043
23044static inline void
23045RHASH_UNSET_TRANSIENT_FLAG(VALUE h)
23046{
23047
23048 RB_FL_UNSET_RAW(h, RHASH_TRANSIENT_FLAG);
23049
23050}
23051
23052
23053
23054
23055
23056
23057
23058
23059
23060
23061
23062
23063
23064
23065
23066
23067
23068
23069
23070enum rb_int_parse_flags {
23071 RB_INT_PARSE_SIGN = 0x01,
23072 RB_INT_PARSE_UNDERSCORE = 0x02,
23073 RB_INT_PARSE_PREFIX = 0x04,
23074 RB_INT_PARSE_ALL = 0x07,
23075 RB_INT_PARSE_DEFAULT = 0x07,
23076};
23077
23078struct RBignum {
23079 struct RBasic basic;
23080 union {
23081 struct {
23082 size_t len;
23083 unsigned int *digits;
23084 } heap;
23085 unsigned int ary[(8*RVALUE_EMBED_LEN_MAX/4)];
23086 } as;
23087};
23088
23089
23090extern const char ruby_digitmap[];
23091double rb_big_fdiv_double(VALUE x, VALUE y);
23092VALUE rb_big_uminus(VALUE x);
23093VALUE rb_big_hash(VALUE);
23094VALUE rb_big_odd_p(VALUE);
23095VALUE rb_big_even_p(VALUE);
23096size_t rb_big_size(VALUE);
23097VALUE rb_integer_float_cmp(VALUE x, VALUE y);
23098VALUE rb_integer_float_eq(VALUE x, VALUE y);
23099VALUE rb_str_convert_to_inum(VALUE str, int base, int badcheck, int raise_exception);
23100VALUE rb_big_comp(VALUE x);
23101VALUE rb_big_aref(VALUE x, VALUE y);
23102VALUE rb_big_abs(VALUE x);
23103VALUE rb_big_size_m(VALUE big);
23104VALUE rb_big_bit_length(VALUE big);
23105VALUE rb_big_remainder(VALUE x, VALUE y);
23106VALUE rb_big_gt(VALUE x, VALUE y);
23107VALUE rb_big_ge(VALUE x, VALUE y);
23108VALUE rb_big_lt(VALUE x, VALUE y);
23109VALUE rb_big_le(VALUE x, VALUE y);
23110VALUE rb_int_powm(int const argc, VALUE * const argv, VALUE const num);
23111static inline _Bool BIGNUM_SIGN(VALUE b);
23112static inline _Bool BIGNUM_POSITIVE_P(VALUE b);
23113static inline _Bool BIGNUM_NEGATIVE_P(VALUE b);
23114static inline void BIGNUM_SET_SIGN(VALUE b, _Bool sign);
23115static inline void BIGNUM_NEGATE(VALUE b);
23116static inline size_t BIGNUM_LEN(VALUE b);
23117static inline unsigned int *BIGNUM_DIGITS(VALUE b);
23118static inline int BIGNUM_LENINT(VALUE b);
23119static inline _Bool BIGNUM_EMBED_P(VALUE b);
23120
23121
23122VALUE rb_big_mul_normal(VALUE x, VALUE y);
23123VALUE rb_big_mul_balance(VALUE x, VALUE y);
23124VALUE rb_big_mul_karatsuba(VALUE x, VALUE y);
23125VALUE rb_big_mul_toom3(VALUE x, VALUE y);
23126VALUE rb_big_sq_fast(VALUE x);
23127VALUE rb_big_divrem_normal(VALUE x, VALUE y);
23128VALUE rb_big2str_poweroftwo(VALUE x, int base);
23129VALUE rb_big2str_generic(VALUE x, int base);
23130VALUE rb_str2big_poweroftwo(VALUE arg, int base, int badcheck);
23131VALUE rb_str2big_normal(VALUE arg, int base, int badcheck);
23132VALUE rb_str2big_karatsuba(VALUE arg, int base, int badcheck);
23133
23134VALUE rb_big_mul_gmp(VALUE x, VALUE y);
23135VALUE rb_big_divrem_gmp(VALUE x, VALUE y);
23136VALUE rb_big2str_gmp(VALUE x, int base);
23137VALUE rb_str2big_gmp(VALUE arg, int base, int badcheck);
23138
23139VALUE rb_int_parse_cstr(const char *str, ssize_t len, char **endp, size_t *ndigits, int base, int flags);
23140
23141
23142VALUE rb_int128t2big(__int128 n);
23143
23144
23145
23146static inline _Bool
23147BIGNUM_SIGN(VALUE b)
23148{
23149 return RB_FL_TEST_RAW(b, ((VALUE)RUBY_FL_USER1));
23150}
23151
23152static inline _Bool
23153BIGNUM_POSITIVE_P(VALUE b)
23154{
23155 return BIGNUM_SIGN(b);
23156}
23157
23158static inline _Bool
23159BIGNUM_NEGATIVE_P(VALUE b)
23160{
23161 return ! BIGNUM_POSITIVE_P(b);
23162}
23163
23164static inline void
23165BIGNUM_SET_SIGN(VALUE b, _Bool sign)
23166{
23167 if (sign) {
23168 RB_FL_SET_RAW(b, ((VALUE)RUBY_FL_USER1));
23169 }
23170 else {
23171 RB_FL_UNSET_RAW(b, ((VALUE)RUBY_FL_USER1));
23172 }
23173}
23174
23175static inline void
23176BIGNUM_NEGATE(VALUE b)
23177{
23178 RB_FL_REVERSE_RAW(b, ((VALUE)RUBY_FL_USER1));
23179}
23180
23181static inline size_t
23182BIGNUM_LEN(VALUE b)
23183{
23184 if (! BIGNUM_EMBED_P(b)) {
23185 return ((struct RBignum*)(b))->as.heap.len;
23186 }
23187 else {
23188 size_t ret = ((struct RBasic *)(b))->flags;
23189 ret &= (~(~(VALUE)0U << 3) << (((VALUE)RUBY_FL_USHIFT)+3));
23190 ret >>= (((VALUE)RUBY_FL_USHIFT)+3);
23191 return ret;
23192 }
23193}
23194
23195static inline int
23196BIGNUM_LENINT(VALUE b)
23197{
23198 return rb_long2int_inline(BIGNUM_LEN(b));
23199}
23200
23201
23202static inline unsigned int *
23203BIGNUM_DIGITS(VALUE b)
23204{
23205 if (BIGNUM_EMBED_P(b)) {
23206 return ((struct RBignum*)(b))->as.ary;
23207 }
23208 else {
23209 return ((struct RBignum*)(b))->as.heap.digits;
23210 }
23211}
23212
23213static inline _Bool
23214BIGNUM_EMBED_P(VALUE b)
23215{
23216 return RB_FL_TEST_RAW(b, ((VALUE)((VALUE)RUBY_FL_USER2)));
23217}
23218
23219
23220
23221
23222
23223
23224
23225
23226
23227
23228
23229
23230
23231
23232
23233
23234
23235
23236
23237
23238
23239
23240
23241
23242
23243
23244
23245
23246
23247
23248
23249
23250
23251
23252
23253
23254
23255static inline uint16_t ruby_swap16(uint16_t);
23256static inline uint32_t ruby_swap32(uint32_t);
23257static inline uint64_t ruby_swap64(uint64_t);
23258static inline unsigned nlz_int(unsigned x);
23259static inline unsigned nlz_long(unsigned long x);
23260static inline unsigned nlz_long_long(unsigned long long x);
23261static inline unsigned nlz_intptr(uintptr_t x);
23262static inline unsigned nlz_int32(uint32_t x);
23263static inline unsigned nlz_int64(uint64_t x);
23264
23265static inline unsigned nlz_int128(unsigned __int128 x);
23266
23267static inline unsigned rb_popcount32(uint32_t x);
23268static inline unsigned rb_popcount64(uint64_t x);
23269static inline unsigned rb_popcount_intptr(uintptr_t x);
23270static inline int ntz_int32(uint32_t x);
23271static inline int ntz_int64(uint64_t x);
23272static inline int ntz_intptr(uintptr_t x);
23273static inline VALUE RUBY_BIT_ROTL(VALUE, int);
23274static inline VALUE RUBY_BIT_ROTR(VALUE, int);
23275
23276static inline uint16_t
23277ruby_swap16(uint16_t x)
23278{
23279
23280 return __builtin_bswap16(x);
23281}
23282
23283static inline uint32_t
23284ruby_swap32(uint32_t x)
23285{
23286
23287 return __builtin_bswap32(x);
23288}
23289
23290static inline uint64_t
23291ruby_swap64(uint64_t x)
23292{
23293
23294 return __builtin_bswap64(x);
23295}
23296
23297static inline unsigned int
23298nlz_int32(uint32_t x)
23299{
23300 __extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (sizeof(int) * 8 == 32) ? 2 : -1; })];
23301 return x ? (unsigned int)__builtin_clz(x) : 32;
23302}
23303
23304static inline unsigned int
23305nlz_int64(uint64_t x)
23306{
23307 if (x == 0) {
23308 return 64;
23309 }
23310 else if (sizeof(long) * 8 == 64) {
23311 return (unsigned int)__builtin_clzl((unsigned long)x);
23312 }
23313 else if (sizeof(long long) * 8 == 64) {
23314 return (unsigned int)__builtin_clzll((unsigned long long)x);
23315 }
23316 else {
23317
23318 __builtin_unreachable();
23319 }
23320}
23321
23322
23323static inline unsigned int
23324nlz_int128(unsigned __int128 x)
23325{
23326 uint64_t y = (uint64_t)(x >> 64);
23327
23328 if (x == 0) {
23329 return 128;
23330 }
23331 else if (y == 0) {
23332 return (unsigned int)nlz_int64(x) + 64;
23333 }
23334 else {
23335 return (unsigned int)nlz_int64(y);
23336 }
23337}
23338
23339
23340static inline unsigned int
23341nlz_int(unsigned int x)
23342{
23343 if (sizeof(unsigned int) * 8 == 32) {
23344 return nlz_int32((uint32_t)x);
23345 }
23346 else if (sizeof(unsigned int) * 8 == 64) {
23347 return nlz_int64((uint64_t)x);
23348 }
23349 else {
23350 __builtin_unreachable();
23351 }
23352}
23353
23354static inline unsigned int
23355nlz_long(unsigned long x)
23356{
23357 if (sizeof(unsigned long) * 8 == 32) {
23358 return nlz_int32((uint32_t)x);
23359 }
23360 else if (sizeof(unsigned long) * 8 == 64) {
23361 return nlz_int64((uint64_t)x);
23362 }
23363 else {
23364 __builtin_unreachable();
23365 }
23366}
23367
23368static inline unsigned int
23369nlz_long_long(unsigned long long x)
23370{
23371 if (sizeof(unsigned long long) * 8 == 64) {
23372 return nlz_int64((uint64_t)x);
23373 }
23374
23375 else if (sizeof(unsigned long long) * 8 == 128) {
23376 return nlz_int128((unsigned __int128)x);
23377 }
23378
23379 else {
23380 __builtin_unreachable();
23381 }
23382}
23383
23384static inline unsigned int
23385nlz_intptr(uintptr_t x)
23386{
23387 if (sizeof(uintptr_t) == sizeof(unsigned int)) {
23388 return nlz_int((unsigned int)x);
23389 }
23390 if (sizeof(uintptr_t) == sizeof(unsigned long)) {
23391 return nlz_long((unsigned long)x);
23392 }
23393 if (sizeof(uintptr_t) == sizeof(unsigned long long)) {
23394 return nlz_long_long((unsigned long long)x);
23395 }
23396 else {
23397 __builtin_unreachable();
23398 }
23399}
23400
23401static inline unsigned int
23402rb_popcount32(uint32_t x)
23403{
23404
23405
23406
23407
23408
23409
23410
23411 __extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (sizeof(int) * 8 >= 32) ? 2 : -1; })];
23412 return (unsigned int)__builtin_popcount(x);
23413}
23414
23415static inline unsigned int
23416rb_popcount64(uint64_t x)
23417{
23418
23419
23420
23421
23422 if (sizeof(long) * 8 == 64) {
23423 return (unsigned int)__builtin_popcountl((unsigned long)x);
23424 }
23425 else if (sizeof(long long) * 8 == 64) {
23426 return (unsigned int)__builtin_popcountll((unsigned long long)x);
23427 }
23428 else {
23429
23430 __builtin_unreachable();
23431 }
23432}
23433
23434static inline unsigned int
23435rb_popcount_intptr(uintptr_t x)
23436{
23437 if (sizeof(uintptr_t) * 8 == 64) {
23438 return rb_popcount64((uint64_t)x);
23439 }
23440 else if (sizeof(uintptr_t) * 8 == 32) {
23441 return rb_popcount32((uint32_t)x);
23442 }
23443 else {
23444 __builtin_unreachable();
23445 }
23446}
23447
23448static inline int
23449ntz_int32(uint32_t x)
23450{
23451 __extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (sizeof(int) * 8 == 32) ? 2 : -1; })];
23452 return x ? (unsigned)__builtin_ctz(x) : 32;
23453
23454
23455
23456
23457
23458}
23459
23460static inline int
23461ntz_int64(uint64_t x)
23462{
23463 if (x == 0) {
23464 return 64;
23465 }
23466 else if (sizeof(long) * 8 == 64) {
23467 return (unsigned)__builtin_ctzl((unsigned long)x);
23468 }
23469 else if (sizeof(long long) * 8 == 64) {
23470 return (unsigned)__builtin_ctzll((unsigned long long)x);
23471 }
23472 else {
23473
23474 __builtin_unreachable();
23475 }
23476
23477
23478
23479
23480
23481}
23482
23483static inline int
23484ntz_intptr(uintptr_t x)
23485{
23486 if (sizeof(uintptr_t) * 8 == 64) {
23487 return ntz_int64((uint64_t)x);
23488 }
23489 else if (sizeof(uintptr_t) * 8 == 32) {
23490 return ntz_int32((uint32_t)x);
23491 }
23492 else {
23493 __builtin_unreachable();
23494 }
23495}
23496
23497static inline VALUE
23498RUBY_BIT_ROTL(VALUE v, int n)
23499{
23500
23501
23502
23503
23504 return __builtin_rotateleft64(v, n);
23505}
23506
23507static inline VALUE
23508RUBY_BIT_ROTR(VALUE v, int n)
23509{
23510
23511
23512
23513
23514 return __builtin_rotateright64(v, n);
23515}
23516
23517VALUE rb_int128t2big(__int128 n);
23518
23519
23520static inline long rb_overflowed_fix_to_int(long x);
23521static inline VALUE rb_fix_plus_fix(VALUE x, VALUE y);
23522static inline VALUE rb_fix_minus_fix(VALUE x, VALUE y);
23523static inline VALUE rb_fix_mul_fix(VALUE x, VALUE y);
23524static inline void rb_fix_divmod_fix(VALUE x, VALUE y, VALUE *divp, VALUE *modp);
23525static inline VALUE rb_fix_div_fix(VALUE x, VALUE y);
23526static inline VALUE rb_fix_mod_fix(VALUE x, VALUE y);
23527static inline _Bool FIXNUM_POSITIVE_P(VALUE num);
23528static inline _Bool FIXNUM_NEGATIVE_P(VALUE num);
23529static inline _Bool FIXNUM_ZERO_P(VALUE num);
23530
23531static inline long
23532rb_overflowed_fix_to_int(long x)
23533{
23534 return (long)((unsigned long)(x >> 1) ^ (1LU << (8 * 8 - 1)));
23535}
23536
23537static inline VALUE
23538rb_fix_plus_fix(VALUE x, VALUE y)
23539{
23540
23541
23542
23543
23544 long lz;
23545 if (__builtin_add_overflow((long)x, (long)y-1, &lz)) {
23546 return rb_int2big(rb_overflowed_fix_to_int(lz));
23547 }
23548 else {
23549 return (VALUE)lz;
23550 }
23551
23552}
23553
23554static inline VALUE
23555rb_fix_minus_fix(VALUE x, VALUE y)
23556{
23557
23558
23559
23560
23561 long lz;
23562 if (__builtin_sub_overflow((long)x, (long)y-1, &lz)) {
23563 return rb_int2big(rb_overflowed_fix_to_int(lz));
23564 }
23565 else {
23566 return (VALUE)lz;
23567 }
23568
23569}
23570
23571
23572static inline VALUE
23573rb_fix_mul_fix(VALUE x, VALUE y)
23574{
23575 long lx = rb_fix2long(x);
23576 long ly = rb_fix2long(y);
23577
23578 return (((((__int128)lx * (__int128)ly) < (9223372036854775807L / 2) + 1) && (((__int128)lx * (__int128)ly) >= ((-9223372036854775807L -1L) / 2))) ? RB_INT2FIX((__int128)lx * (__int128)ly) : rb_int128t2big((__int128)lx * (__int128)ly));
23579}
23580
23581
23582
23583
23584
23585static inline void
23586rb_fix_divmod_fix(VALUE a, VALUE b, VALUE *divp, VALUE *modp)
23587{
23588
23589
23590
23591
23592 long x = rb_fix2long(a);
23593 long y = rb_fix2long(b);
23594 long div, mod;
23595 if (x == ((-9223372036854775807L -1L) / 2) && y == -1) {
23596 if (divp) *divp = rb_long2num_inline(-((-9223372036854775807L -1L) / 2));
23597 if (modp) *modp = RB_INT2FIX(0);
23598 return;
23599 }
23600 div = x / y;
23601 mod = x % y;
23602 if (y > 0 ? mod < 0 : mod > 0) {
23603 mod += y;
23604 div -= 1;
23605 }
23606 if (divp) *divp = RB_INT2FIX(div);
23607 if (modp) *modp = RB_INT2FIX(mod);
23608}
23609
23610
23611
23612
23613static inline VALUE
23614rb_fix_div_fix(VALUE x, VALUE y)
23615{
23616 VALUE div;
23617 rb_fix_divmod_fix(x, y, &div, ((void*)0));
23618 return div;
23619}
23620
23621
23622
23623
23624static inline VALUE
23625rb_fix_mod_fix(VALUE x, VALUE y)
23626{
23627 VALUE mod;
23628 rb_fix_divmod_fix(x, y, ((void*)0), &mod);
23629 return mod;
23630}
23631
23632static inline _Bool
23633FIXNUM_POSITIVE_P(VALUE num)
23634{
23635 return (long)num > (long)__builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0));
23636}
23637
23638static inline _Bool
23639FIXNUM_NEGATIVE_P(VALUE num)
23640{
23641 return (long)num < 0;
23642}
23643
23644static inline _Bool
23645FIXNUM_ZERO_P(VALUE num)
23646{
23647 return num == __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0));
23648}
23649
23650
23651
23652
23653
23654
23655
23656
23657
23658
23659
23660
23661
23662enum ruby_num_rounding_mode {
23663 RUBY_NUM_ROUND_HALF_UP,
23664 RUBY_NUM_ROUND_HALF_EVEN,
23665 RUBY_NUM_ROUND_HALF_DOWN,
23666 RUBY_NUM_ROUND_DEFAULT = RUBY_NUM_ROUND_HALF_UP,
23667};
23668
23669struct RFloat {
23670 struct RBasic basic;
23671 double float_value;
23672};
23673
23674
23675
23676int rb_num_to_uint(VALUE val, unsigned int *ret);
23677VALUE ruby_num_interval_step_size(VALUE from, VALUE to, VALUE step, int excl);
23678double ruby_float_step_size(double beg, double end, double unit, int excl);
23679int ruby_float_step(VALUE from, VALUE to, VALUE step, int excl, int allow_endless);
23680int rb_num_negative_p(VALUE);
23681VALUE rb_int_succ(VALUE num);
23682VALUE rb_int_uminus(VALUE num);
23683VALUE rb_float_uminus(VALUE num);
23684VALUE rb_int_plus(VALUE x, VALUE y);
23685VALUE rb_float_plus(VALUE x, VALUE y);
23686VALUE rb_int_minus(VALUE x, VALUE y);
23687VALUE rb_int_mul(VALUE x, VALUE y);
23688VALUE rb_float_mul(VALUE x, VALUE y);
23689VALUE rb_float_div(VALUE x, VALUE y);
23690VALUE rb_int_idiv(VALUE x, VALUE y);
23691VALUE rb_int_modulo(VALUE x, VALUE y);
23692VALUE rb_int2str(VALUE num, int base);
23693VALUE rb_fix_plus(VALUE x, VALUE y);
23694VALUE rb_int_gt(VALUE x, VALUE y);
23695VALUE rb_float_gt(VALUE x, VALUE y);
23696VALUE rb_int_ge(VALUE x, VALUE y);
23697enum ruby_num_rounding_mode rb_num_get_rounding_option(VALUE opts);
23698double rb_int_fdiv_double(VALUE x, VALUE y);
23699VALUE rb_int_pow(VALUE x, VALUE y);
23700VALUE rb_float_pow(VALUE x, VALUE y);
23701VALUE rb_int_cmp(VALUE x, VALUE y);
23702VALUE rb_int_equal(VALUE x, VALUE y);
23703VALUE rb_int_divmod(VALUE x, VALUE y);
23704VALUE rb_int_and(VALUE x, VALUE y);
23705VALUE rb_int_lshift(VALUE x, VALUE y);
23706VALUE rb_int_div(VALUE x, VALUE y);
23707int rb_int_positive_p(VALUE num);
23708int rb_int_negative_p(VALUE num);
23709VALUE rb_num_pow(VALUE x, VALUE y);
23710VALUE rb_float_ceil(VALUE num, int ndigits);
23711VALUE rb_float_abs(VALUE flt);
23712static inline VALUE rb_num_compare_with_zero(VALUE num, ID mid);
23713static inline int rb_num_positive_int_p(VALUE num);
23714static inline int rb_num_negative_int_p(VALUE num);
23715static inline double rb_float_flonum_value(VALUE v);
23716static inline double rb_float_noflonum_value(VALUE v);
23717static inline double rb_float_value_inline(VALUE v);
23718static inline VALUE rb_float_new_inline(double d);
23719static inline _Bool INT_POSITIVE_P(VALUE num);
23720static inline _Bool INT_NEGATIVE_P(VALUE num);
23721static inline _Bool FLOAT_ZERO_P(VALUE num);
23722
23723
23724VALUE rb_int_positive_pow(long x, unsigned long y);
23725
23726VALUE rb_flo_div_flo(VALUE x, VALUE y);
23727double ruby_float_mod(double x, double y);
23728VALUE rb_float_equal(VALUE x, VALUE y);
23729int rb_float_cmp(VALUE x, VALUE y);
23730VALUE rb_float_eql(VALUE x, VALUE y);
23731VALUE rb_fix_aref(VALUE fix, VALUE idx);
23732VALUE rb_int_zero_p(VALUE num);
23733VALUE rb_int_even_p(VALUE num);
23734VALUE rb_int_odd_p(VALUE num);
23735VALUE rb_int_abs(VALUE num);
23736VALUE rb_int_bit_length(VALUE num);
23737
23738static inline _Bool
23739INT_POSITIVE_P(VALUE num)
23740{
23741 if (RB_FIXNUM_P(num)) {
23742 return FIXNUM_POSITIVE_P(num);
23743 }
23744 else {
23745 return BIGNUM_POSITIVE_P(num);
23746 }
23747}
23748
23749static inline _Bool
23750INT_NEGATIVE_P(VALUE num)
23751{
23752 if (RB_FIXNUM_P(num)) {
23753 return FIXNUM_NEGATIVE_P(num);
23754 }
23755 else {
23756 return BIGNUM_NEGATIVE_P(num);
23757 }
23758}
23759
23760static inline _Bool
23761FLOAT_ZERO_P(VALUE num)
23762{
23763 return rb_float_value_inline(num) == 0.0;
23764}
23765
23766static inline VALUE
23767rb_num_compare_with_zero(VALUE num, ID mid)
23768{
23769 VALUE zero = __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0));
23770 VALUE r = rb_check_funcall(num, mid, 1, &zero);
23771 if (r == ((VALUE)RUBY_Qundef)) {
23772 rb_cmperr(num, zero);
23773 }
23774 return r;
23775}
23776
23777static inline int
23778rb_num_positive_int_p(VALUE num)
23779{
23780 const ID mid = '>';
23781
23782 if (RB_FIXNUM_P(num)) {
23784 return FIXNUM_POSITIVE_P(num);
23785 }
23786 else if ((__builtin_constant_p(RUBY_T_BIGNUM) ? rbimpl_RB_TYPE_P_fastpath((num), (RUBY_T_BIGNUM)) : (RB_TYPE_P)((num), (RUBY_T_BIGNUM)))) {
23788 return BIGNUM_POSITIVE_P(num);
23789 }
23790 return RB_TEST(rb_num_compare_with_zero(num, mid));
23791}
23792
23793static inline int
23794rb_num_negative_int_p(VALUE num)
23795{
23796 const ID mid = '<';
23797
23798 if (RB_FIXNUM_P(num)) {
23800 return FIXNUM_NEGATIVE_P(num);
23801 }
23802 else if ((__builtin_constant_p(RUBY_T_BIGNUM) ? rbimpl_RB_TYPE_P_fastpath((num), (RUBY_T_BIGNUM)) : (RB_TYPE_P)((num), (RUBY_T_BIGNUM)))) {
23804 return BIGNUM_NEGATIVE_P(num);
23805 }
23806 return RB_TEST(rb_num_compare_with_zero(num, mid));
23807}
23808
23809static inline double
23810rb_float_flonum_value(VALUE v)
23811{
23812
23813 if (v != (VALUE)0x8000000000000002) {
23814 union {
23815 double d;
23816 VALUE v;
23817 } t;
23818
23819 VALUE b63 = (v >> 63);
23820
23821
23822
23823 t.v = RUBY_BIT_ROTR((2 - b63) | (v & ~(VALUE)0x03), 3);
23824 return t.d;
23825 }
23826
23827 return 0.0;
23828}
23829
23830static inline double
23831rb_float_noflonum_value(VALUE v)
23832{
23833 return ((struct RFloat*)(v))->float_value;
23834}
23835
23836static inline double
23837rb_float_value_inline(VALUE v)
23838{
23839 if (RB_FLONUM_P(v)) {
23840 return rb_float_flonum_value(v);
23841 }
23842 return rb_float_noflonum_value(v);
23843}
23844
23845static inline VALUE
23846rb_float_new_inline(double d)
23847{
23848
23849 union {
23850 double d;
23851 VALUE v;
23852 } t;
23853 int bits;
23854
23855 t.d = d;
23856 bits = (int)((VALUE)(t.v >> 60) & 0x7);
23857
23858
23859
23860
23861
23862 if (t.v != 0x3000000000000000 &&
23863 !((bits-3) & ~0x01)) {
23864 return (RUBY_BIT_ROTL(t.v, 3) & ~(VALUE)0x01) | 0x02;
23865 }
23866 else if (t.v == (VALUE)0) {
23867
23868 return 0x8000000000000002;
23869 }
23870
23871
23872 return rb_float_new_in_heap(d);
23873}
23874
23875
23876
23877
23878int ruby_fill_random_bytes(void *, size_t, int);
23879
23880
23881
23882
23883
23884
23885
23886
23887
23888void rb_gc_mark_global_tbl(void);
23889void rb_gc_update_global_tbl(void);
23890size_t rb_generic_ivar_memsize(VALUE);
23891VALUE rb_search_class_path(VALUE);
23892VALUE rb_attr_delete(VALUE, ID);
23893VALUE rb_ivar_lookup(VALUE obj, ID id, VALUE undef);
23894void rb_autoload_str(VALUE mod, ID id, VALUE file);
23895VALUE rb_autoload_at_p(VALUE, ID, int);
23896__declspec(noreturn) VALUE rb_mod_const_missing(VALUE,VALUE);
23897rb_gvar_getter_t *rb_gvar_getter_function_of(ID);
23898rb_gvar_setter_t *rb_gvar_setter_function_of(ID);
23899void rb_gvar_readonly_setter(VALUE v, ID id, VALUE *_);
23900static inline _Bool ROBJ_TRANSIENT_P(VALUE obj);
23901static inline void ROBJ_TRANSIENT_SET(VALUE obj);
23902static inline void ROBJ_TRANSIENT_UNSET(VALUE obj);
23903
23904
23905void rb_mark_generic_ivar(VALUE);
23906void rb_mv_generic_ivar(VALUE src, VALUE dst);
23907VALUE rb_const_missing(VALUE klass, VALUE name);
23908int rb_class_ivar_set(VALUE klass, ID vid, VALUE value);
23909void rb_iv_tbl_copy(VALUE dst, VALUE src);
23910void rb_deprecate_constant(VALUE mod, const char *name);
23911
23912VALUE rb_gvar_get(ID);
23913VALUE rb_gvar_set(ID, VALUE);
23914VALUE rb_gvar_defined(ID);
23915void rb_const_warn_if_deprecated(const rb_const_entry_t *, VALUE, ID);
23916
23917static inline _Bool
23918ROBJ_TRANSIENT_P(VALUE obj)
23919{
23920
23921 return RB_FL_TEST_RAW(obj, ((VALUE)RUBY_FL_USER13));
23922
23923
23924
23925}
23926
23927static inline void
23928ROBJ_TRANSIENT_SET(VALUE obj)
23929{
23930
23931 RB_FL_SET_RAW(obj, ((VALUE)RUBY_FL_USER13));
23932
23933}
23934
23935static inline void
23936ROBJ_TRANSIENT_UNSET(VALUE obj)
23937{
23938
23939 RB_FL_UNSET_RAW(obj, ((VALUE)RUBY_FL_USER13));
23940
23941}
23942
23943struct gen_ivtbl {
23944 uint32_t numiv;
23945 VALUE ivptr[];
23946};
23947
23948struct st_table *rb_ivar_generic_ivtbl(void);
23949
23950
23951
23952enum ruby_vminsn_type {
23953 YARVINSN_nop,
23954 YARVINSN_getlocal,
23955 YARVINSN_setlocal,
23956 YARVINSN_getblockparam,
23957 YARVINSN_setblockparam,
23958 YARVINSN_getblockparamproxy,
23959 YARVINSN_getspecial,
23960 YARVINSN_setspecial,
23961 YARVINSN_getinstancevariable,
23962 YARVINSN_setinstancevariable,
23963 YARVINSN_getclassvariable,
23964 YARVINSN_setclassvariable,
23965 YARVINSN_getconstant,
23966 YARVINSN_setconstant,
23967 YARVINSN_getglobal,
23968 YARVINSN_setglobal,
23969 YARVINSN_putnil,
23970 YARVINSN_putself,
23971 YARVINSN_putobject,
23972 YARVINSN_putspecialobject,
23973 YARVINSN_putstring,
23974 YARVINSN_concatstrings,
23975 YARVINSN_tostring,
23976 YARVINSN_freezestring,
23977 YARVINSN_toregexp,
23978 YARVINSN_intern,
23979 YARVINSN_newarray,
23980 YARVINSN_newarraykwsplat,
23981 YARVINSN_duparray,
23982 YARVINSN_duphash,
23983 YARVINSN_expandarray,
23984 YARVINSN_concatarray,
23985 YARVINSN_splatarray,
23986 YARVINSN_newhash,
23987 YARVINSN_newrange,
23988 YARVINSN_pop,
23989 YARVINSN_dup,
23990 YARVINSN_dupn,
23991 YARVINSN_swap,
23992 YARVINSN_reverse,
23993 YARVINSN_topn,
23994 YARVINSN_setn,
23995 YARVINSN_adjuststack,
23996 YARVINSN_defined,
23997 YARVINSN_checkmatch,
23998 YARVINSN_checkkeyword,
23999 YARVINSN_checktype,
24000 YARVINSN_defineclass,
24001 YARVINSN_definemethod,
24002 YARVINSN_definesmethod,
24003 YARVINSN_send,
24004 YARVINSN_opt_send_without_block,
24005 YARVINSN_opt_str_freeze,
24006 YARVINSN_opt_nil_p,
24007 YARVINSN_opt_str_uminus,
24008 YARVINSN_opt_newarray_max,
24009 YARVINSN_opt_newarray_min,
24010 YARVINSN_invokesuper,
24011 YARVINSN_invokeblock,
24012 YARVINSN_leave,
24013 YARVINSN_throw,
24014 YARVINSN_jump,
24015 YARVINSN_branchif,
24016 YARVINSN_branchunless,
24017 YARVINSN_branchnil,
24018 YARVINSN_opt_getinlinecache,
24019 YARVINSN_opt_setinlinecache,
24020 YARVINSN_once,
24021 YARVINSN_opt_case_dispatch,
24022 YARVINSN_opt_plus,
24023 YARVINSN_opt_minus,
24024 YARVINSN_opt_mult,
24025 YARVINSN_opt_div,
24026 YARVINSN_opt_mod,
24027 YARVINSN_opt_eq,
24028 YARVINSN_opt_neq,
24029 YARVINSN_opt_lt,
24030 YARVINSN_opt_le,
24031 YARVINSN_opt_gt,
24032 YARVINSN_opt_ge,
24033 YARVINSN_opt_ltlt,
24034 YARVINSN_opt_and,
24035 YARVINSN_opt_or,
24036 YARVINSN_opt_aref,
24037 YARVINSN_opt_aset,
24038 YARVINSN_opt_aset_with,
24039 YARVINSN_opt_aref_with,
24040 YARVINSN_opt_length,
24041 YARVINSN_opt_size,
24042 YARVINSN_opt_empty_p,
24043 YARVINSN_opt_succ,
24044 YARVINSN_opt_not,
24045 YARVINSN_opt_regexpmatch2,
24046 YARVINSN_invokebuiltin,
24047 YARVINSN_opt_invokebuiltin_delegate,
24048 YARVINSN_opt_invokebuiltin_delegate_leave,
24049 YARVINSN_getlocal_WC_0,
24050 YARVINSN_getlocal_WC_1,
24051 YARVINSN_setlocal_WC_0,
24052 YARVINSN_setlocal_WC_1,
24053 YARVINSN_putobject_INT2FIX_0_,
24054 YARVINSN_putobject_INT2FIX_1_,
24055 YARVINSN_trace_nop,
24056 YARVINSN_trace_getlocal,
24057 YARVINSN_trace_setlocal,
24058 YARVINSN_trace_getblockparam,
24059 YARVINSN_trace_setblockparam,
24060 YARVINSN_trace_getblockparamproxy,
24061 YARVINSN_trace_getspecial,
24062 YARVINSN_trace_setspecial,
24063 YARVINSN_trace_getinstancevariable,
24064 YARVINSN_trace_setinstancevariable,
24065 YARVINSN_trace_getclassvariable,
24066 YARVINSN_trace_setclassvariable,
24067 YARVINSN_trace_getconstant,
24068 YARVINSN_trace_setconstant,
24069 YARVINSN_trace_getglobal,
24070 YARVINSN_trace_setglobal,
24071 YARVINSN_trace_putnil,
24072 YARVINSN_trace_putself,
24073 YARVINSN_trace_putobject,
24074 YARVINSN_trace_putspecialobject,
24075 YARVINSN_trace_putstring,
24076 YARVINSN_trace_concatstrings,
24077 YARVINSN_trace_tostring,
24078 YARVINSN_trace_freezestring,
24079 YARVINSN_trace_toregexp,
24080 YARVINSN_trace_intern,
24081 YARVINSN_trace_newarray,
24082 YARVINSN_trace_newarraykwsplat,
24083 YARVINSN_trace_duparray,
24084 YARVINSN_trace_duphash,
24085 YARVINSN_trace_expandarray,
24086 YARVINSN_trace_concatarray,
24087 YARVINSN_trace_splatarray,
24088 YARVINSN_trace_newhash,
24089 YARVINSN_trace_newrange,
24090 YARVINSN_trace_pop,
24091 YARVINSN_trace_dup,
24092 YARVINSN_trace_dupn,
24093 YARVINSN_trace_swap,
24094 YARVINSN_trace_reverse,
24095 YARVINSN_trace_topn,
24096 YARVINSN_trace_setn,
24097 YARVINSN_trace_adjuststack,
24098 YARVINSN_trace_defined,
24099 YARVINSN_trace_checkmatch,
24100 YARVINSN_trace_checkkeyword,
24101 YARVINSN_trace_checktype,
24102 YARVINSN_trace_defineclass,
24103 YARVINSN_trace_definemethod,
24104 YARVINSN_trace_definesmethod,
24105 YARVINSN_trace_send,
24106 YARVINSN_trace_opt_send_without_block,
24107 YARVINSN_trace_opt_str_freeze,
24108 YARVINSN_trace_opt_nil_p,
24109 YARVINSN_trace_opt_str_uminus,
24110 YARVINSN_trace_opt_newarray_max,
24111 YARVINSN_trace_opt_newarray_min,
24112 YARVINSN_trace_invokesuper,
24113 YARVINSN_trace_invokeblock,
24114 YARVINSN_trace_leave,
24115 YARVINSN_trace_throw,
24116 YARVINSN_trace_jump,
24117 YARVINSN_trace_branchif,
24118 YARVINSN_trace_branchunless,
24119 YARVINSN_trace_branchnil,
24120 YARVINSN_trace_opt_getinlinecache,
24121 YARVINSN_trace_opt_setinlinecache,
24122 YARVINSN_trace_once,
24123 YARVINSN_trace_opt_case_dispatch,
24124 YARVINSN_trace_opt_plus,
24125 YARVINSN_trace_opt_minus,
24126 YARVINSN_trace_opt_mult,
24127 YARVINSN_trace_opt_div,
24128 YARVINSN_trace_opt_mod,
24129 YARVINSN_trace_opt_eq,
24130 YARVINSN_trace_opt_neq,
24131 YARVINSN_trace_opt_lt,
24132 YARVINSN_trace_opt_le,
24133 YARVINSN_trace_opt_gt,
24134 YARVINSN_trace_opt_ge,
24135 YARVINSN_trace_opt_ltlt,
24136 YARVINSN_trace_opt_and,
24137 YARVINSN_trace_opt_or,
24138 YARVINSN_trace_opt_aref,
24139 YARVINSN_trace_opt_aset,
24140 YARVINSN_trace_opt_aset_with,
24141 YARVINSN_trace_opt_aref_with,
24142 YARVINSN_trace_opt_length,
24143 YARVINSN_trace_opt_size,
24144 YARVINSN_trace_opt_empty_p,
24145 YARVINSN_trace_opt_succ,
24146 YARVINSN_trace_opt_not,
24147 YARVINSN_trace_opt_regexpmatch2,
24148 YARVINSN_trace_invokebuiltin,
24149 YARVINSN_trace_opt_invokebuiltin_delegate,
24150 YARVINSN_trace_opt_invokebuiltin_delegate_leave,
24151 YARVINSN_trace_getlocal_WC_0,
24152 YARVINSN_trace_getlocal_WC_1,
24153 YARVINSN_trace_setlocal_WC_0,
24154 YARVINSN_trace_setlocal_WC_1,
24155 YARVINSN_trace_putobject_INT2FIX_0_,
24156 YARVINSN_trace_putobject_INT2FIX_1_,
24157 VM_INSTRUCTION_SIZE
24158};
24159
24160
24161
24162
24163
24164extern rb_method_definition_t *rb_method_definition_create(rb_method_type_t type, ID mid);
24165extern void rb_method_definition_set(const rb_method_entry_t *me, rb_method_definition_t *def, void *opts);
24166extern int rb_method_definition_eq(const rb_method_definition_t *d1, const rb_method_definition_t *d2);
24167extern VALUE rb_make_no_method_exception(VALUE exc, VALUE format, VALUE obj,
24168 int argc, const VALUE *argv, int priv);
24169
24170
24171
24172
24173
24174
24175
24176static rb_control_frame_t *vm_get_ruby_level_caller_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp);
24177
24178static VALUE
24179ruby_vm_special_exception_copy(VALUE exc)
24180{
24181 VALUE e = rb_obj_alloc(rb_class_real(RBASIC_CLASS(exc)));
24182 rb_obj_copy_ivar(e, exc);
24183 return e;
24184}
24185
24186__declspec(noreturn) static void ec_stack_overflow(rb_execution_context_t *ec, int);
24187static void
24188ec_stack_overflow(rb_execution_context_t *ec, int setup)
24189{
24190 VALUE mesg = rb_ec_vm_ptr(ec)->special_exceptions[ruby_error_sysstack];
24191 ec->raised_flag = RAISED_STACKOVERFLOW;
24192 if (setup) {
24193 VALUE at = rb_ec_backtrace_object(ec);
24194 mesg = ruby_vm_special_exception_copy(mesg);
24195 rb_ivar_set(mesg, idBt, at);
24196 rb_ivar_set(mesg, idBt_locations, at);
24197 }
24198 ec->errinfo = mesg;
24199 rb_ec_tag_jump(ec, RUBY_TAG_RAISE);
24200}
24201
24202__declspec(noreturn) static void vm_stackoverflow(void);
24203
24204__declspec(noinline) static __attribute__((__cold__)) void vm_stackoverflow(void);
24205
24206
24207static void
24208vm_stackoverflow(void)
24209{
24210 ec_stack_overflow(rb_current_execution_context(), 1);
24211}
24212
24213__declspec(noreturn) static void rb_ec_stack_overflow(rb_execution_context_t *ec, int crit);
24214static void
24215rb_ec_stack_overflow(rb_execution_context_t *ec, int crit)
24216{
24217 if (crit || rb_during_gc()) {
24218 ec->raised_flag = RAISED_STACKOVERFLOW;
24219 ec->errinfo = rb_ec_vm_ptr(ec)->special_exceptions[ruby_error_stackfatal];
24220 rb_ec_tag_jump(ec, RUBY_TAG_RAISE);
24221 }
24222
24223 ec_stack_overflow(ec, 1);
24224
24225
24226
24227}
24228
24229
24230__extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: ((-2) == -2) ? 2 : -1; })];
24231__extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: ((-1) == -1) ? 2 : -1; })];
24232__extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (( 0) == -0) ? 2 : -1; })];
24233
24234static void
24235vm_push_frame(rb_execution_context_t *ec,
24236 const rb_iseq_t *iseq,
24237 VALUE type,
24238 VALUE self,
24239 VALUE specval,
24240 VALUE cref_or_me,
24241 const VALUE *pc,
24242 VALUE *sp,
24243 int local_size,
24244 int stack_max)
24245{
24246 rb_control_frame_t *const cfp = ((ec->cfp)-1);
24247
24248 ;
24249 ((void)0);
24250
24251
24252 do { __extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (sizeof(*(sp)) == sizeof(VALUE)) ? 2 : -1; })]; __extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (sizeof(*(cfp)) == sizeof(rb_control_frame_t)) ? 2 : -1; })]; const struct rb_control_frame_struct *bound = (void *)&(sp)[(local_size + stack_max)]; if ((__builtin_expect(!!((cfp) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
24253 ;
24254
24255
24256
24257
24258 for (int i=0; i < local_size; i++) {
24259 *sp++ = ((VALUE)RUBY_Qnil);
24260 }
24261
24262
24263 *sp++ = cref_or_me;
24264 *sp++ = specval ;
24265 *sp++ = type;
24266
24267
24268 *cfp = (const struct rb_control_frame_struct) {
24269 .pc = pc,
24270 .sp = sp,
24271 .iseq = iseq,
24272 .self = self,
24273 .ep = sp - 1,
24274 .block_code = ((void*)0),
24275 .__bp__ = sp,
24276
24277
24278
24279 };
24280
24281 ec->cfp = cfp;
24282
24283 if (0 == 2) {
24284 rb_vmdebug_stack_dump_raw(rb_current_execution_context(), rb_current_execution_context()->cfp);
24285 }
24286 ;
24287}
24288
24289
24290static inline int
24291vm_pop_frame(rb_execution_context_t *ec, rb_control_frame_t *cfp, const VALUE *ep)
24292{
24293 VALUE flags = ep[( 0)];
24294
24295 if ((((0) > 0) ? (0) : 0) >= 4) rb_gc_verify_internal_consistency();
24296 if (0 == 2) rb_vmdebug_stack_dump_raw(rb_current_execution_context(), rb_current_execution_context()->cfp);
24297
24298 rb_vm_check_ints(ec);
24299 ec->cfp = ((cfp)+1);
24300
24301 return flags & VM_FRAME_FLAG_FINISH;
24302}
24303
24304static void
24305rb_vm_pop_frame(rb_execution_context_t *ec)
24306{
24307 vm_pop_frame(ec, ec->cfp, ec->cfp->ep);
24308}
24309
24310
24311static inline VALUE
24312rb_arity_error_new(int argc, int min, int max)
24313{
24314 VALUE err_mess = 0;
24315 if (min == max) {
24316 err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d)", argc, min);
24317 }
24318 else if (max == (-1)) {
24319 err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d+)", argc, min);
24320 }
24321 else {
24322 err_mess = rb_sprintf("wrong number of arguments (given %d, expected %d..%d)", argc, min, max);
24323 }
24324 return rb_exc_new_str(rb_eArgError, err_mess);
24325}
24326
24327static void
24328rb_error_arity(int argc, int min, int max)
24329{
24330 rb_exc_raise(rb_arity_error_new(argc, min, max));
24331}
24332
24333
24334
24335__declspec(noinline) static void vm_env_write_slowpath(const VALUE *ep, int index, VALUE v);
24336
24337static void
24338vm_env_write_slowpath(const VALUE *ep, int index, VALUE v)
24339{
24340
24341 rb_gc_writebarrier_remember(VM_ENV_ENVVAL(ep));
24342 VM_FORCE_WRITE(&ep[index], v);
24343 VM_ENV_FLAGS_UNSET(ep, VM_ENV_FLAG_WB_REQUIRED);
24344 ((void)0);
24345}
24346
24347static inline void
24348vm_env_write(const VALUE *ep, int index, VALUE v)
24349{
24350 VALUE flags = ep[( 0)];
24351 if ((__builtin_expect(!!((flags & VM_ENV_FLAG_WB_REQUIRED) == 0), 1))) {
24352 VM_STACK_ENV_WRITE(ep, index, v);
24353 }
24354 else {
24355 vm_env_write_slowpath(ep, index, v);
24356 }
24357}
24358
24359static VALUE
24360rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler)
24361{
24362 if (block_handler == 0) {
24363 return ((VALUE)RUBY_Qnil);
24364 }
24365 else {
24366 switch (vm_block_handler_type(block_handler)) {
24367 case block_handler_type_iseq:
24368 case block_handler_type_ifunc:
24369 return rb_vm_make_proc(ec, VM_BH_TO_CAPT_BLOCK(block_handler), rb_cProc);
24370 case block_handler_type_symbol:
24371 return rb_sym_to_proc(VM_BH_TO_SYMBOL(block_handler));
24372 case block_handler_type_proc:
24373 return VM_BH_TO_PROC(block_handler);
24374 default:
24375 __builtin_unreachable();
24376 }
24377 }
24378}
24379static inline struct vm_svar *
24380lep_svar(const rb_execution_context_t *ec, const VALUE *lep)
24381{
24382 VALUE svar;
24383
24384 if (lep && (ec == ((void*)0) || ec->root_lep != lep)) {
24385 svar = lep[(-2)];
24386 }
24387 else {
24388 svar = ec->root_svar;
24389 }
24390
24391 ((void)0);
24392
24393 return (struct vm_svar *)svar;
24394}
24395
24396static inline void
24397lep_svar_write(const rb_execution_context_t *ec, const VALUE *lep, const struct vm_svar *svar)
24398{
24399 ((void)0);
24400
24401 if (lep && (ec == ((void*)0) || ec->root_lep != lep)) {
24402 vm_env_write(lep, (-2), (VALUE)svar);
24403 }
24404 else {
24405 __extension__({
24406;
24407; __typeof__(rb_obj_write((VALUE)(rb_ec_thread_ptr(ec)->self), (VALUE *)(&ec->root_svar), (VALUE)(svar), "./vm_insnhelper.c", 537)) unaligned_member_access_result = (rb_obj_write((VALUE)(rb_ec_thread_ptr(ec)->self), (VALUE *)(&ec->root_svar), (VALUE)(svar), "./vm_insnhelper.c", 537));
24408; unaligned_member_access_result; });
24409 }
24410}
24411
24412static VALUE
24413lep_svar_get(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key)
24414{
24415 const struct vm_svar *svar = lep_svar(ec, lep);
24416
24417 if ((VALUE)svar == ((VALUE)RUBY_Qfalse) || imemo_type((VALUE)svar) != imemo_svar) return ((VALUE)RUBY_Qnil);
24418
24419 switch (key) {
24420 case VM_SVAR_LASTLINE:
24421 return svar->lastline;
24422 case VM_SVAR_BACKREF:
24423 return svar->backref;
24424 default: {
24425 const VALUE ary = svar->others;
24426
24427 if (RB_NIL_P(ary)) {
24428 return ((VALUE)RUBY_Qnil);
24429 }
24430 else {
24431 return rb_ary_entry(ary, key - VM_SVAR_EXTRA_START);
24432 }
24433 }
24434 }
24435}
24436
24437static struct vm_svar *
24438svar_new(VALUE obj)
24439{
24440 return (struct vm_svar *)rb_imemo_new(imemo_svar, ((VALUE)RUBY_Qnil), ((VALUE)RUBY_Qnil), ((VALUE)RUBY_Qnil), obj);
24441}
24442
24443static void
24444lep_svar_set(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, VALUE val)
24445{
24446 struct vm_svar *svar = lep_svar(ec, lep);
24447
24448 if ((VALUE)svar == ((VALUE)RUBY_Qfalse) || imemo_type((VALUE)svar) != imemo_svar) {
24449 lep_svar_write(ec, lep, svar = svar_new((VALUE)svar));
24450 }
24451
24452 switch (key) {
24453 case VM_SVAR_LASTLINE:
24454 __extension__({
24455;
24456; __typeof__(rb_obj_write((VALUE)(svar), (VALUE *)(&svar->lastline), (VALUE)(val), "./vm_insnhelper.c", 583)) unaligned_member_access_result = (rb_obj_write((VALUE)(svar), (VALUE *)(&svar->lastline), (VALUE)(val), "./vm_insnhelper.c", 583));
24457; unaligned_member_access_result; });
24458 return;
24459 case VM_SVAR_BACKREF:
24460 __extension__({
24461;
24462; __typeof__(rb_obj_write((VALUE)(svar), (VALUE *)(&svar->backref), (VALUE)(val), "./vm_insnhelper.c", 586)) unaligned_member_access_result = (rb_obj_write((VALUE)(svar), (VALUE *)(&svar->backref), (VALUE)(val), "./vm_insnhelper.c", 586));
24463; unaligned_member_access_result; });
24464 return;
24465 default: {
24466 VALUE ary = svar->others;
24467
24468 if (RB_NIL_P(ary)) {
24469 __extension__({
24470;
24471; __typeof__(rb_obj_write((VALUE)(svar), (VALUE *)(&svar->others), (VALUE)(ary = rb_ary_new()), "./vm_insnhelper.c", 592)) unaligned_member_access_result = (rb_obj_write((VALUE)(svar), (VALUE *)(&svar->others), (VALUE)(ary = rb_ary_new()), "./vm_insnhelper.c", 592));
24472; unaligned_member_access_result; });
24473 }
24474 rb_ary_store(ary, key - VM_SVAR_EXTRA_START, val);
24475 }
24476 }
24477}
24478
24479static inline VALUE
24480vm_getspecial(const rb_execution_context_t *ec, const VALUE *lep, rb_num_t key, rb_num_t type)
24481{
24482 VALUE val;
24483
24484 if (type == 0) {
24485 val = lep_svar_get(ec, lep, key);
24486 }
24487 else {
24488 VALUE backref = lep_svar_get(ec, lep, VM_SVAR_BACKREF);
24489
24490 if (type & 0x01) {
24491 switch (type >> 1) {
24492 case '&':
24493 val = rb_reg_last_match(backref);
24494 break;
24495 case '`':
24496 val = rb_reg_match_pre(backref);
24497 break;
24498 case '\'':
24499 val = rb_reg_match_post(backref);
24500 break;
24501 case '+':
24502 val = rb_reg_match_last(backref);
24503 break;
24504 default:
24505 rb_bug("unexpected back-ref");
24506 }
24507 }
24508 else {
24509 val = rb_reg_nth_match((int)(type >> 1), backref);
24510 }
24511 }
24512 return val;
24513}
24514
24515__attribute__((__pure__)) static rb_callable_method_entry_t *check_method_entry(VALUE obj, int can_be_svar);
24517check_method_entry(VALUE obj, int can_be_svar)
24518{
24519 if (obj == ((VALUE)RUBY_Qfalse)) return ((void*)0);
24520
24521
24522
24523
24524
24525 switch (imemo_type(obj)) {
24526 case imemo_ment:
24527 return (rb_callable_method_entry_t *)obj;
24528 case imemo_cref:
24529 return ((void*)0);
24530 case imemo_svar:
24531 if (can_be_svar) {
24532 return check_method_entry(((struct vm_svar *)obj)->cref_or_me, 0);
24533 }
24534 default:
24535
24536
24537
24538 return ((void*)0);
24539 }
24540}
24541
24542static const rb_callable_method_entry_t *
24543rb_vm_frame_method_entry(const rb_control_frame_t *cfp)
24544{
24545 const VALUE *ep = cfp->ep;
24547
24548 while (!VM_ENV_LOCAL_P(ep)) {
24549 if ((me = check_method_entry(ep[(-2)], 0)) != ((void*)0)) return me;
24550 ep = VM_ENV_PREV_EP(ep);
24551 }
24552
24553 return check_method_entry(ep[(-2)], 1);
24554}
24555
24556static rb_cref_t *
24557method_entry_cref(rb_callable_method_entry_t *me)
24558{
24559 switch (me->def->type) {
24560 case VM_METHOD_TYPE_ISEQ:
24561 return me->def->body.iseq.cref;
24562 default:
24563 return ((void*)0);
24564 }
24565}
24566
24567
24568__attribute__((__pure__)) static rb_cref_t *check_cref(VALUE, int);
24569
24570static rb_cref_t *
24571check_cref(VALUE obj, int can_be_svar)
24572{
24573 if (obj == ((VALUE)RUBY_Qfalse)) return ((void*)0);
24574
24575
24576
24577
24578
24579 switch (imemo_type(obj)) {
24580 case imemo_ment:
24581 return method_entry_cref((rb_callable_method_entry_t *)obj);
24582 case imemo_cref:
24583 return (rb_cref_t *)obj;
24584 case imemo_svar:
24585 if (can_be_svar) {
24586 return check_cref(((struct vm_svar *)obj)->cref_or_me, 0);
24587 }
24588 default:
24589
24590
24591
24592 return ((void*)0);
24593 }
24594}
24595
24596static inline rb_cref_t *
24597vm_env_cref(const VALUE *ep)
24598{
24599 rb_cref_t *cref;
24600
24601 while (!VM_ENV_LOCAL_P(ep)) {
24602 if ((cref = check_cref(ep[(-2)], 0)) != ((void*)0)) return cref;
24603 ep = VM_ENV_PREV_EP(ep);
24604 }
24605
24606 return check_cref(ep[(-2)], 1);
24607}
24608
24609static int
24610is_cref(const VALUE v, int can_be_svar)
24611{
24612 if ((__builtin_constant_p(RUBY_T_IMEMO) ? rbimpl_RB_TYPE_P_fastpath((v), (RUBY_T_IMEMO)) : (RB_TYPE_P)((v), (RUBY_T_IMEMO)))) {
24613 switch (imemo_type(v)) {
24614 case imemo_cref:
24615 return 1;
24616 case imemo_svar:
24617 if (can_be_svar) return is_cref(((struct vm_svar *)v)->cref_or_me, 0);
24618 default:
24619 break;
24620 }
24621 }
24622 return 0;
24623}
24624
24625static int
24626vm_env_cref_by_cref(const VALUE *ep)
24627{
24628 while (!VM_ENV_LOCAL_P(ep)) {
24629 if (is_cref(ep[(-2)], 0)) return 1;
24630 ep = VM_ENV_PREV_EP(ep);
24631 }
24632 return is_cref(ep[(-2)], 1);
24633}
24634
24635static rb_cref_t *
24636cref_replace_with_duplicated_cref_each_frame(const VALUE *vptr, int can_be_svar, VALUE parent)
24637{
24638 const VALUE v = *vptr;
24639 rb_cref_t *cref, *new_cref;
24640
24641 if ((__builtin_constant_p(RUBY_T_IMEMO) ? rbimpl_RB_TYPE_P_fastpath((v), (RUBY_T_IMEMO)) : (RB_TYPE_P)((v), (RUBY_T_IMEMO)))) {
24642 switch (imemo_type(v)) {
24643 case imemo_cref:
24644 cref = (rb_cref_t *)v;
24645 new_cref = vm_cref_dup(cref);
24646 if (parent) {
24647 __extension__({
24648;
24649; __typeof__(rb_obj_write((VALUE)(parent), (VALUE *)(vptr), (VALUE)(new_cref), "./vm_insnhelper.c", 767)) unaligned_member_access_result = (rb_obj_write((VALUE)(parent), (VALUE *)(vptr), (VALUE)(new_cref), "./vm_insnhelper.c", 767));
24650; unaligned_member_access_result; });
24651 }
24652 else {
24653 VM_FORCE_WRITE(vptr, (VALUE)new_cref);
24654 }
24655 return (rb_cref_t *)new_cref;
24656 case imemo_svar:
24657 if (can_be_svar) {
24658 return cref_replace_with_duplicated_cref_each_frame((const VALUE *)&((struct vm_svar *)v)->cref_or_me, 0, v);
24659 }
24660
24661 case imemo_ment:
24662 rb_bug("cref_replace_with_duplicated_cref_each_frame: unreachable");
24663 default:
24664 break;
24665 }
24666 }
24667 return 0;
24668}
24669
24670static rb_cref_t *
24671vm_cref_replace_with_duplicated_cref(const VALUE *ep)
24672{
24673 if (vm_env_cref_by_cref(ep)) {
24674 rb_cref_t *cref;
24675 VALUE envval;
24676
24677 while (!VM_ENV_LOCAL_P(ep)) {
24678 envval = VM_ENV_ESCAPED_P(ep) ? VM_ENV_ENVVAL(ep) : ((VALUE)RUBY_Qfalse);
24679 if ((cref = cref_replace_with_duplicated_cref_each_frame(&ep[(-2)], 0, envval)) != ((void*)0)) {
24680 return cref;
24681 }
24682 ep = VM_ENV_PREV_EP(ep);
24683 }
24684 envval = VM_ENV_ESCAPED_P(ep) ? VM_ENV_ENVVAL(ep) : ((VALUE)RUBY_Qfalse);
24685 return cref_replace_with_duplicated_cref_each_frame(&ep[(-2)], 1, envval);
24686 }
24687 else {
24688 rb_bug("vm_cref_dup: unreachable");
24689 }
24690}
24691
24692static rb_cref_t *
24693vm_get_cref(const VALUE *ep)
24694{
24695 rb_cref_t *cref = vm_env_cref(ep);
24696
24697 if (cref != ((void*)0)) {
24698 return cref;
24699 }
24700 else {
24701 rb_bug("vm_get_cref: unreachable");
24702 }
24703}
24704
24705static rb_cref_t *
24706vm_ec_cref(const rb_execution_context_t *ec)
24707{
24708 const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
24709
24710 if (cfp == ((void*)0)) {
24711 return ((void*)0);
24712 }
24713 return vm_get_cref(cfp->ep);
24714}
24715
24716static const rb_cref_t *
24717vm_get_const_key_cref(const VALUE *ep)
24718{
24719 const rb_cref_t *cref = vm_get_cref(ep);
24720 const rb_cref_t *key_cref = cref;
24721
24722 while (cref) {
24723 if (RB_FL_TEST(CREF_CLASS(cref), ((VALUE)RUBY_FL_SINGLETON)) ||
24724 RB_FL_TEST(CREF_CLASS(cref), ((VALUE)RUBY_FL_USER6))) {
24725 return key_cref;
24726 }
24727 cref = CREF_NEXT(cref);
24728 }
24729
24730
24731 return ((void*)0);
24732}static inline
24733
24734void
24735rb_vm_rewrite_cref(rb_cref_t *cref, VALUE old_klass, VALUE new_klass, rb_cref_t **new_cref_ptr)
24736{
24737 rb_cref_t *new_cref;
24738
24739 while (cref) {
24740 if (CREF_CLASS(cref) == old_klass) {
24741 new_cref = vm_cref_new_use_prev(new_klass, METHOD_VISI_UNDEF, 0, cref, 0);
24742 *new_cref_ptr = new_cref;
24743 return;
24744 }
24745 new_cref = vm_cref_new_use_prev(CREF_CLASS(cref), METHOD_VISI_UNDEF, 0, cref, 0);
24746 cref = CREF_NEXT(cref);
24747 *new_cref_ptr = new_cref;
24748 new_cref_ptr = (rb_cref_t **)&new_cref->next;
24749 }
24750 *new_cref_ptr = ((void*)0);
24751}
24752
24753static rb_cref_t *
24754vm_cref_push(const rb_execution_context_t *ec, VALUE klass, const VALUE *ep, int pushed_by_eval)
24755{
24756 rb_cref_t *prev_cref = ((void*)0);
24757
24758 if (ep) {
24759 prev_cref = vm_env_cref(ep);
24760 }
24761 else {
24762 rb_control_frame_t *cfp = vm_get_ruby_level_caller_cfp(ec, ec->cfp);
24763
24764 if (cfp) {
24765 prev_cref = vm_env_cref(cfp->ep);
24766 }
24767 }
24768
24769 return vm_cref_new(klass, METHOD_VISI_PUBLIC, 0, prev_cref, pushed_by_eval);
24770}
24771
24772static inline VALUE
24773vm_get_cbase(const VALUE *ep)
24774{
24775 const rb_cref_t *cref = vm_get_cref(ep);
24776 VALUE klass = ((VALUE)RUBY_Qundef);
24777
24778 while (cref) {
24779 if ((klass = CREF_CLASS(cref)) != 0) {
24780 break;
24781 }
24782 cref = CREF_NEXT(cref);
24783 }
24784
24785 return klass;
24786}
24787
24788static inline VALUE
24789vm_get_const_base(const VALUE *ep)
24790{
24791 const rb_cref_t *cref = vm_get_cref(ep);
24792 VALUE klass = ((VALUE)RUBY_Qundef);
24793
24794 while (cref) {
24795 if (!CREF_PUSHED_BY_EVAL(cref) &&
24796 (klass = CREF_CLASS(cref)) != 0) {
24797 break;
24798 }
24799 cref = CREF_NEXT(cref);
24800 }
24801
24802 return klass;
24803}
24804
24805static inline void
24806vm_check_if_namespace(VALUE klass)
24807{
24808 if (!(__builtin_constant_p(RUBY_T_CLASS) ? rbimpl_RB_TYPE_P_fastpath((klass), (RUBY_T_CLASS)) : (RB_TYPE_P)((klass), (RUBY_T_CLASS))) && !(__builtin_constant_p(RUBY_T_MODULE) ? rbimpl_RB_TYPE_P_fastpath((klass), (RUBY_T_MODULE)) : (RB_TYPE_P)((klass), (RUBY_T_MODULE)))) {
24809 rb_raise(rb_eTypeError, "%+""l""i" "\v"" is not a class/module", klass);
24810 }
24811}
24812
24813static inline void
24814vm_ensure_not_refinement_module(VALUE self)
24815{
24816 if ((__builtin_constant_p(RUBY_T_MODULE) ? rbimpl_RB_TYPE_P_fastpath((self), (RUBY_T_MODULE)) : (RB_TYPE_P)((self), (RUBY_T_MODULE))) && RB_FL_TEST(self, RMODULE_IS_REFINEMENT)) {
24817 rb_warn("not defined at the refinement, but at the outer class/module");
24818 }
24819}
24820
24821static inline VALUE
24822vm_get_iclass(rb_control_frame_t *cfp, VALUE klass)
24823{
24824 return klass;
24825}
24826
24827static inline VALUE
24828vm_get_ev_const(rb_execution_context_t *ec, VALUE orig_klass, ID id, _Bool allow_nil, int is_defined)
24829{
24830 void rb_const_warn_if_deprecated(const rb_const_entry_t *ce, VALUE klass, ID id);
24831 VALUE val;
24832
24833 if (orig_klass == ((VALUE)RUBY_Qnil) && allow_nil) {
24834
24835 const rb_cref_t *root_cref = vm_get_cref(ec->cfp->ep);
24836 const rb_cref_t *cref;
24837 VALUE klass = ((VALUE)RUBY_Qnil);
24838
24839 while (root_cref && CREF_PUSHED_BY_EVAL(root_cref)) {
24840 root_cref = CREF_NEXT(root_cref);
24841 }
24842 cref = root_cref;
24843 while (cref && CREF_NEXT(cref)) {
24844 if (CREF_PUSHED_BY_EVAL(cref)) {
24845 klass = ((VALUE)RUBY_Qnil);
24846 }
24847 else {
24848 klass = CREF_CLASS(cref);
24849 }
24850 cref = CREF_NEXT(cref);
24851
24852 if (!RB_NIL_P(klass)) {
24853 VALUE av, am = 0;
24854 rb_const_entry_t *ce;
24855 search_continue:
24856 if ((ce = rb_const_lookup(klass, id))) {
24857 rb_const_warn_if_deprecated(ce, klass, id);
24858 val = ce->value;
24859 if (val == ((VALUE)RUBY_Qundef)) {
24860 if (am == klass) break;
24861 am = klass;
24862 if (is_defined) return 1;
24863 if (rb_autoloading_value(klass, id, &av, ((void*)0))) return av;
24864 rb_autoload_load(klass, id);
24865 goto search_continue;
24866 }
24867 else {
24868 if (is_defined) {
24869 return 1;
24870 }
24871 else {
24872 return val;
24873 }
24874 }
24875 }
24876 }
24877 }
24878
24879
24880 if (root_cref && !RB_NIL_P(CREF_CLASS(root_cref))) {
24881 klass = vm_get_iclass(ec->cfp, CREF_CLASS(root_cref));
24882 }
24883 else {
24884 klass = rb_class_of(ec->cfp->self);
24885 }
24886
24887 if (is_defined) {
24888 return rb_const_defined(klass, id);
24889 }
24890 else {
24891 return rb_const_get(klass, id);
24892 }
24893 }
24894 else {
24895 vm_check_if_namespace(orig_klass);
24896 if (is_defined) {
24897 return rb_public_const_defined_from(orig_klass, id);
24898 }
24899 else {
24900 return rb_public_const_get_from(orig_klass, id);
24901 }
24902 }
24903}
24904
24905static inline VALUE
24906vm_get_cvar_base(const rb_cref_t *cref, rb_control_frame_t *cfp, int top_level_raise)
24907{
24908 VALUE klass;
24909
24910 if (!cref) {
24911 rb_bug("vm_get_cvar_base: no cref");
24912 }
24913
24914 while (CREF_NEXT(cref) &&
24915 (RB_NIL_P(CREF_CLASS(cref)) || RB_FL_TEST(CREF_CLASS(cref), ((VALUE)RUBY_FL_SINGLETON)) ||
24916 CREF_PUSHED_BY_EVAL(cref))) {
24917 cref = CREF_NEXT(cref);
24918 }
24919 if (top_level_raise && !CREF_NEXT(cref)) {
24920 rb_raise(rb_eRuntimeError, "class variable access from toplevel");
24921 }
24922
24923 klass = vm_get_iclass(cfp, CREF_CLASS(cref));
24924
24925 if (RB_NIL_P(klass)) {
24926 rb_raise(rb_eTypeError, "no class variables available");
24927 }
24928 return klass;
24929}
24930
24931static VALUE
24932vm_search_const_defined_class(const VALUE cbase, ID id)
24933{
24934 if (rb_const_defined_at(cbase, id)) return cbase;
24935 if (cbase == rb_cObject) {
24936 VALUE tmp = RCLASS_SUPER(cbase);
24937 while (tmp) {
24938 if (rb_const_defined_at(tmp, id)) return tmp;
24939 tmp = RCLASS_SUPER(tmp);
24940 }
24941 }
24942 return 0;
24943}
24944
24945__attribute__ ((__always_inline__)) static VALUE vm_getivar(VALUE, ID, IVC, const struct rb_callcache *, int);
24946static inline VALUE
24947vm_getivar(VALUE obj, ID id, IVC ic, const struct rb_callcache *cc, int is_attr)
24948{
24949
24950 VALUE val = ((VALUE)RUBY_Qundef);
24951
24952 if (RB_SPECIAL_CONST_P(obj)) {
24953
24954 }
24955 else if ((__builtin_expect(!!(is_attr ? (!!(vm_cc_attr_index(cc) > 0)) : (!!(ic->ic_serial == (((struct RClass *)(((struct RBasic *)(obj))->klass))->class_serial)))), 1))) {
24956
24957
24958
24959 st_index_t index = !is_attr ? ic->index : (vm_cc_attr_index(cc) - 1);
24960
24961 ((void)0);
24962
24963 if ((__builtin_expect(!!(RB_BUILTIN_TYPE(obj) == RUBY_T_OBJECT), 1)) &&
24964 (__builtin_expect(!!(index < ROBJECT_NUMIV(obj)), 1))) {
24965 val = ROBJECT_IVPTR(obj)[index];
24966 }
24967 else if (RB_FL_TEST_RAW(obj, ((VALUE)RUBY_FL_EXIVAR))) {
24968 struct gen_ivtbl *ivtbl;
24969
24970 if ((__builtin_expect(!!(rb_st_lookup(rb_ivar_generic_ivtbl(), (st_data_t)obj, (st_data_t *)&ivtbl)), 1)) &&
24971 (__builtin_expect(!!(index < ivtbl->numiv), 1))) {
24972 val = ivtbl->ivptr[index];
24973 }
24974 }
24975 goto ret;
24976 }
24977 else {
24978 struct st_table *iv_index_tbl;
24979 st_index_t numiv;
24980 VALUE *ivptr;
24981
24982 st_data_t index;
24983
24984 if (RB_BUILTIN_TYPE(obj) == RUBY_T_OBJECT) {
24985 iv_index_tbl = ROBJECT_IV_INDEX_TBL_inline(obj);
24986 numiv = ROBJECT_NUMIV(obj);
24987 ivptr = ROBJECT_IVPTR(obj);
24988 goto fill;
24989 }
24990 else if (RB_FL_TEST_RAW(obj, ((VALUE)RUBY_FL_EXIVAR))) {
24991 struct gen_ivtbl *ivtbl;
24992
24993 if ((__builtin_expect(!!(rb_st_lookup(rb_ivar_generic_ivtbl(), (st_data_t)obj, (st_data_t *)&ivtbl)), 1))) {
24994 numiv = ivtbl->numiv;
24995 ivptr = ivtbl->ivptr;
24996 iv_index_tbl = ((((struct RClass *)(rb_obj_class(obj)))->ptr)->iv_index_tbl);
24997 goto fill;
24998 }
24999 else {
25000 goto ret;
25001 }
25002 }
25003 else {
25004
25005 goto general_path;
25006 }
25007
25008 fill:
25009 if (iv_index_tbl) {
25010 if (rb_st_lookup(iv_index_tbl, id, &index)) {
25011 if (!is_attr) {
25012 ic->index = index;
25013 ic->ic_serial = (((struct RClass *)(((struct RBasic *)(obj))->klass))->class_serial);
25014 }
25015 else {
25016 vm_cc_attr_index_set(cc, (int)index + 1);
25017 }
25018
25019 if (index < numiv) {
25020 val = ivptr[index];
25021 }
25022 }
25023 }
25024
25025 ret:
25026 if ((__builtin_expect(!!(val != ((VALUE)RUBY_Qundef)), 1))) {
25027 return val;
25028 }
25029 else {
25030 if (!is_attr && RB_TEST((*rb_ruby_verbose_ptr()))) {
25031 rb_warning("instance variable %""l""i" "\v"" not initialized", QUOTE_ID(id));
25032 }
25033 return ((VALUE)RUBY_Qnil);
25034 }
25035 }
25036 general_path:
25037
25038 ((void)0);
25039
25040 if (is_attr) {
25041 return rb_attr_get(obj, id);
25042 }
25043 else {
25044 return rb_ivar_get(obj, id);
25045 }
25046}
25047
25048static inline VALUE
25049vm_setivar(VALUE obj, ID id, VALUE val, IVC ic, const struct rb_callcache *cc, int is_attr)
25050{
25051
25052 do { VALUE frozen_obj = (obj); if ((__builtin_expect(!!(RB_OBJ_FROZEN(frozen_obj)), 0))) { rb_error_frozen_object(frozen_obj); } } while (0);
25053
25054 if ((__builtin_expect(!!((__builtin_constant_p(RUBY_T_OBJECT) ? rbimpl_RB_TYPE_P_fastpath((obj), (RUBY_T_OBJECT)) : (RB_TYPE_P)((obj), (RUBY_T_OBJECT)))), 1))) {
25055 VALUE klass = ((struct RBasic *)(obj))->klass;
25056 st_data_t index;
25057
25058 if ((__builtin_expect(!!((!is_attr && (!!(ic->ic_serial == (((struct RClass *)(klass))->class_serial)))) || ( is_attr && (!!(vm_cc_attr_index(cc) > 0)))), 1))) {
25059
25060
25061 VALUE *ptr = ROBJECT_IVPTR(obj);
25062 index = !is_attr ? ic->index : vm_cc_attr_index(cc)-1;
25063
25064 if ((!!(index < ROBJECT_NUMIV(obj)))) {
25065 __extension__({
25066;
25067; __typeof__(rb_obj_write((VALUE)(obj), (VALUE *)(&ptr[index]), (VALUE)(val), "./vm_insnhelper.c", 1182)) unaligned_member_access_result = (rb_obj_write((VALUE)(obj), (VALUE *)(&ptr[index]), (VALUE)(val), "./vm_insnhelper.c", 1182));
25068; unaligned_member_access_result; });
25069 ((void)0);
25070 return val;
25071 }
25072 }
25073 else {
25074 struct st_table *iv_index_tbl = ROBJECT_IV_INDEX_TBL_inline(obj);
25075
25076 if (iv_index_tbl && rb_st_lookup(iv_index_tbl, (st_data_t)id, &index)) {
25077 if (!is_attr) {
25078 ic->index = index;
25079 ic->ic_serial = (((struct RClass *)(klass))->class_serial);
25080 }
25081 else if (index >= 2147483647) {
25082 rb_raise(rb_eArgError, "too many instance variables");
25083 }
25084 else {
25085 vm_cc_attr_index_set(cc, (int)(index + 1));
25086 }
25087 }
25088
25089 }
25090 }
25091 else {
25092 ((void)0);
25093 }
25094
25095 ((void)0);
25096 return rb_ivar_set(obj, id, val);
25097}
25098
25099static inline VALUE
25100vm_getinstancevariable(VALUE obj, ID id, IVC ic)
25101{
25102 return vm_getivar(obj, id, ic, ((void*)0), 0);
25103}
25104
25105static inline void
25106vm_setinstancevariable(VALUE obj, ID id, VALUE val, IVC ic)
25107{
25108 vm_setivar(obj, id, val, ic, 0, 0);
25109}
25110
25111static VALUE
25112vm_throw_continue(const rb_execution_context_t *ec, VALUE err)
25113{
25114
25115
25116 if (RB_FIXNUM_P(err)) {
25117 ec->tag->state = RB_FIX2INT(err);
25118 }
25119 else if (RB_SYMBOL_P(err)) {
25120 ec->tag->state = RUBY_TAG_THROW;
25121 }
25122 else if (imemo_throw_data_p((VALUE)err)) {
25123 ec->tag->state = THROW_DATA_STATE((struct vm_throw_data *)err);
25124 }
25125 else {
25126 ec->tag->state = RUBY_TAG_RAISE;
25127 }
25128 return err;
25129}
25130
25131static VALUE
25132vm_throw_start(const rb_execution_context_t *ec, rb_control_frame_t *const reg_cfp, enum ruby_tag_type state,
25133 const int flag, const VALUE throwobj)
25134{
25135 const rb_control_frame_t *escape_cfp = ((void*)0);
25136 const rb_control_frame_t * const eocfp = RUBY_VM_END_CONTROL_FRAME(ec);
25137
25138 if (flag != 0) {
25139
25140 }
25141 else if (state == RUBY_TAG_BREAK) {
25142 int is_orphan = 1;
25143 const VALUE *ep = ((((reg_cfp)->ep)));
25144 const rb_iseq_t *base_iseq = ((((reg_cfp)))->iseq);
25145 escape_cfp = reg_cfp;
25146
25147 while (base_iseq->body->type != ISEQ_TYPE_BLOCK) {
25148 if (escape_cfp->iseq->body->type == ISEQ_TYPE_CLASS) {
25149 escape_cfp = ((escape_cfp)+1);
25150 ep = escape_cfp->ep;
25151 base_iseq = escape_cfp->iseq;
25152 }
25153 else {
25154 ep = VM_ENV_PREV_EP(ep);
25155 base_iseq = base_iseq->body->parent_iseq;
25156 escape_cfp = rb_vm_search_cf_from_ep(ec, escape_cfp, ep);
25157 ((void)0);
25158 }
25159 }
25160
25161 if (VM_FRAME_LAMBDA_P(escape_cfp)) {
25162
25163 is_orphan = 0;
25164 state = RUBY_TAG_RETURN;
25165 }
25166 else {
25167 ep = VM_ENV_PREV_EP(ep);
25168
25169 while (escape_cfp < eocfp) {
25170 if (escape_cfp->ep == ep) {
25171 const rb_iseq_t *const iseq = escape_cfp->iseq;
25172 const VALUE epc = escape_cfp->pc - iseq->body->iseq_encoded;
25173 const struct iseq_catch_table *const ct = iseq->body->catch_table;
25174 unsigned int i;
25175
25176 if (!ct) break;
25177 for (i=0; i < ct->size; i++) {
25178 const struct iseq_catch_table_entry *const entry =
25179 __extension__({
25180;
25181; __typeof__(&(ct)->entries[i]) unaligned_member_access_result = (&(ct)->entries[i]);
25182; unaligned_member_access_result; });
25183
25184 if (entry->type == CATCH_TYPE_BREAK &&
25185 entry->iseq == base_iseq &&
25186 entry->start < epc && entry->end >= epc) {
25187 if (entry->cont == epc) {
25188 is_orphan = 0;
25189 }
25190 break;
25191 }
25192 }
25193 break;
25194 }
25195
25196 escape_cfp = ((escape_cfp)+1);
25197 }
25198 }
25199
25200 if (is_orphan) {
25201 rb_vm_localjump_error("break from proc-closure", throwobj, RUBY_TAG_BREAK);
25202 }
25203 }
25204 else if (state == RUBY_TAG_RETRY) {
25205 const VALUE *ep = VM_ENV_PREV_EP(((((reg_cfp)->ep))));
25206
25207 escape_cfp = rb_vm_search_cf_from_ep(ec, reg_cfp, ep);
25208 }
25209 else if (state == RUBY_TAG_RETURN) {
25210 const VALUE *current_ep = ((((reg_cfp)->ep)));
25211 const VALUE *target_lep = VM_EP_LEP(current_ep);
25212 int in_class_frame = 0;
25213 int toplevel = 1;
25214 escape_cfp = reg_cfp;
25215
25216 while (escape_cfp < eocfp) {
25217 const VALUE *lep = VM_CF_LEP(escape_cfp);
25218
25219 if (!target_lep) {
25220 target_lep = lep;
25221 }
25222
25223 if (lep == target_lep &&
25224 VM_FRAME_RUBYFRAME_P(escape_cfp) &&
25225 escape_cfp->iseq->body->type == ISEQ_TYPE_CLASS) {
25226 in_class_frame = 1;
25227 target_lep = 0;
25228 }
25229
25230 if (lep == target_lep) {
25231 if (VM_FRAME_LAMBDA_P(escape_cfp)) {
25232 toplevel = 0;
25233 if (in_class_frame) {
25234
25235 goto valid_return;
25236 }
25237 else {
25238 const VALUE *tep = current_ep;
25239
25240 while (target_lep != tep) {
25241 if (escape_cfp->ep == tep) {
25242
25243 goto valid_return;
25244 }
25245 tep = VM_ENV_PREV_EP(tep);
25246 }
25247 }
25248 }
25249 else if (VM_FRAME_RUBYFRAME_P(escape_cfp)) {
25250 switch (escape_cfp->iseq->body->type) {
25251 case ISEQ_TYPE_TOP:
25252 case ISEQ_TYPE_MAIN:
25253 if (toplevel) {
25254 if (in_class_frame) goto unexpected_return;
25255 goto valid_return;
25256 }
25257 break;
25258 case ISEQ_TYPE_EVAL:
25259 case ISEQ_TYPE_CLASS:
25260 toplevel = 0;
25261 break;
25262 default:
25263 break;
25264 }
25265 }
25266 }
25267
25268 if (escape_cfp->ep == target_lep && escape_cfp->iseq->body->type == ISEQ_TYPE_METHOD) {
25269 goto valid_return;
25270 }
25271
25272 escape_cfp = ((escape_cfp)+1);
25273 }
25274 unexpected_return:;
25275 rb_vm_localjump_error("unexpected return", throwobj, RUBY_TAG_RETURN);
25276
25277 valid_return:;
25278
25279 }
25280 else {
25281 rb_bug("isns(throw): unsupported throw type");
25282 }
25283
25284 ec->tag->state = state;
25285 return (VALUE)THROW_DATA_NEW(throwobj, escape_cfp, state);
25286}
25287
25288static VALUE
25289vm_throw(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
25290 rb_num_t throw_state, VALUE throwobj)
25291{
25292 const int state = (int)(throw_state & VM_THROW_STATE_MASK);
25293 const int flag = (int)(throw_state & VM_THROW_NO_ESCAPE_FLAG);
25294
25295 if (state != 0) {
25296 return vm_throw_start(ec, reg_cfp, state, flag, throwobj);
25297 }
25298 else {
25299 return vm_throw_continue(ec, throwobj);
25300 }
25301}
25302
25303static inline void
25304vm_expandarray(VALUE *sp, VALUE ary, rb_num_t num, int flag)
25305{
25306 int is_splat = flag & 0x01;
25307 rb_num_t space_size = num + is_splat;
25308 VALUE *base = sp - 1;
25309 const VALUE *ptr;
25310 rb_num_t len;
25311 const VALUE obj = ary;
25312
25313 if (!(__builtin_constant_p(RUBY_T_ARRAY) ? rbimpl_RB_TYPE_P_fastpath((ary), (RUBY_T_ARRAY)) : (RB_TYPE_P)((ary), (RUBY_T_ARRAY))) && RB_NIL_P(ary = rb_check_array_type(ary))) {
25314 ary = obj;
25315 ptr = &ary;
25316 len = 1;
25317 }
25318 else {
25319 ptr = rb_array_const_ptr_transient(ary);
25320 len = (rb_num_t)rb_array_len(ary);
25321 }
25322
25323 if (space_size == 0) {
25324
25325 }
25326 else if (flag & 0x02) {
25327
25328 rb_num_t i = 0, j;
25329
25330 if (len < num) {
25331 for (i=0; i<num-len; i++) {
25332 *base++ = ((VALUE)RUBY_Qnil);
25333 }
25334 }
25335 for (j=0; i<num; i++, j++) {
25336 VALUE v = ptr[len - j - 1];
25337 *base++ = v;
25338 }
25339 if (is_splat) {
25340 *base = rb_ary_new_from_values(len - j, ptr);
25341 }
25342 }
25343 else {
25344
25345 rb_num_t i;
25346 VALUE *bptr = &base[space_size - 1];
25347
25348 for (i=0; i<num; i++) {
25349 if (len <= i) {
25350 for (; i<num; i++) {
25351 *bptr-- = ((VALUE)RUBY_Qnil);
25352 }
25353 break;
25354 }
25355 *bptr-- = ptr[i];
25356 }
25357 if (is_splat) {
25358 if (num > len) {
25359 *bptr = rb_ary_new();
25360 }
25361 else {
25362 *bptr = rb_ary_new_from_values(len - num, ptr + num);
25363 }
25364 }
25365 }
25366 (*__extension__ ({ volatile VALUE *rb_gc_guarded_ptr = &(ary); __asm__("" : : "m"(rb_gc_guarded_ptr)); rb_gc_guarded_ptr; }));
25367}
25368
25369static VALUE vm_call_general(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd);
25370
25371static VALUE vm_mtbl_dump(VALUE klass, ID target_mid);
25372
25373static struct rb_class_cc_entries *
25374vm_ccs_create(VALUE klass, const rb_callable_method_entry_t *cme)
25375{
25376 struct rb_class_cc_entries *ccs = ((struct rb_class_cc_entries *)ruby_xmalloc(sizeof(struct rb_class_cc_entries)));
25377
25378
25379
25380 ccs->capa = 4;
25381 ccs->len = 0;
25382 __extension__({
25383;
25384; __typeof__(rb_obj_write((VALUE)(klass), (VALUE *)(&ccs->cme), (VALUE)(cme), "./vm_insnhelper.c", 1493)) unaligned_member_access_result = (rb_obj_write((VALUE)(klass), (VALUE *)(&ccs->cme), (VALUE)(cme), "./vm_insnhelper.c", 1493));
25385; unaligned_member_access_result; });
25386 (((rb_callable_method_entry_t *)cme)->flags |= ((VALUE)RUBY_FL_USER8));
25387 ccs->entries = ((struct rb_class_cc_entries_entry *)ruby_xmalloc2((ccs->capa), sizeof(struct rb_class_cc_entries_entry)));
25388 return ccs;
25389}
25390
25391static void
25392vm_ccs_push(VALUE klass, struct rb_class_cc_entries *ccs, const struct rb_callinfo *ci, const struct rb_callcache *cc)
25393{
25394 if (! vm_cc_markable(cc)) {
25395 return;
25396 }
25397 else if (! vm_ci_markable(ci)) {
25398 return;
25399 }
25400
25401 if ((__builtin_expect(!!(ccs->len == ccs->capa), 0))) {
25402 const int nsize = ccs->capa * 2;
25403 struct rb_class_cc_entries_entry *nents = ((struct rb_class_cc_entries_entry *)ruby_xmalloc2((nsize), sizeof(struct rb_class_cc_entries_entry)));
25404 ccs->capa = nsize;
25405 ruby_nonempty_memcpy((nents), (&ccs->entries[0]), rbimpl_size_mul_or_raise(sizeof(struct rb_class_cc_entries_entry), (ccs->len)));
25406 ruby_xfree(ccs->entries);
25407 ccs->entries = nents;
25408 }
25409 ((void)0);
25410
25411 const int pos = ccs->len++;
25412 __extension__({
25413;
25414; __typeof__(rb_obj_write((VALUE)(klass), (VALUE *)(&ccs->entries[pos].ci), (VALUE)(ci), "./vm_insnhelper.c", 1520)) unaligned_member_access_result = (rb_obj_write((VALUE)(klass), (VALUE *)(&ccs->entries[pos].ci), (VALUE)(ci), "./vm_insnhelper.c", 1520));
25415; unaligned_member_access_result; });
25416 __extension__({
25417;
25418; __typeof__(rb_obj_write((VALUE)(klass), (VALUE *)(&ccs->entries[pos].cc), (VALUE)(cc), "./vm_insnhelper.c", 1521)) unaligned_member_access_result = (rb_obj_write((VALUE)(klass), (VALUE *)(&ccs->entries[pos].cc), (VALUE)(cc), "./vm_insnhelper.c", 1521));
25419; unaligned_member_access_result; });
25420
25421 if (0) {
25422
25423
25424 }
25425}
25426static void
25427vm_search_method_fastpath(VALUE cd_owner, struct rb_call_data *cd, VALUE klass)
25428{
25429 const struct rb_callcache *cc = cd->cc;
25430
25431
25432 if ((__builtin_expect(!!(vm_cc_class_check(cc, klass)), 1))) {
25433 if ((__builtin_expect(!!(!((vm_cc_cme(cc))->flags & ((VALUE)RUBY_FL_USER9))), 1))) {
25434 ((void)0);
25435 ((void)0);
25436 ((void)0);
25437
25438
25439 return;
25440 }
25441 cd->cc =
25442
25443 rb_vm_empty_cc();
25444
25445
25446
25447 ((void)0);
25448 }
25449 else {
25450 ((void)0);
25451 }
25452
25453 rb_vm_search_method_slowpath(cd_owner, cd, klass);
25454
25455 ((void)0);
25456}
25457
25458static void
25459vm_search_method(VALUE cd_owner, struct rb_call_data *cd, VALUE recv)
25460{
25461 VALUE klass = rb_class_of(recv);
25462 ((void)0);
25463 ((void)0);
25464
25465 vm_search_method_fastpath(cd_owner, cd, klass);
25466}
25467
25468static inline int
25469check_cfunc(const rb_callable_method_entry_t *me, VALUE (*func)())
25470{
25471 if (! me) {
25472 return 0;
25473 }
25474 else {
25475 ((void)0);
25476 ((void)0);
25477 ((void)0);
25478 if (me->def->type != VM_METHOD_TYPE_CFUNC) {
25479 return 0;
25480 }
25481 else {
25482 return me->def->body.cfunc.func == func;
25483 }
25484 }
25485}
25486
25487static inline int
25488vm_method_cfunc_is(const rb_iseq_t *iseq, CALL_DATA cd, VALUE recv, VALUE (*func)())
25489{
25490 vm_search_method((VALUE)iseq, cd, recv);
25491 return check_cfunc(vm_cc_cme(cd->cc), func);
25492}
25493
25494
25495static inline _Bool
25496FIXNUM_2_P(VALUE a, VALUE b)
25497{
25498
25499
25500
25501 long x = a;
25502 long y = b;
25503 long z = x & y & 1;
25504 return z == 1;
25505}
25506
25507static inline _Bool
25508FLONUM_2_P(VALUE a, VALUE b)
25509{
25510
25511
25512
25513
25514
25515 long x = a;
25516 long y = b;
25517 long z = ((x ^ 2) | (y ^ 2)) & 3;
25518 return !z;
25519
25520
25521
25522}
25523
25524static VALUE
25525opt_equality(const rb_iseq_t *cd_owner, VALUE recv, VALUE obj, CALL_DATA cd)
25526{
25527 if (FIXNUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 0))) == 0), 1)))) {
25528 goto compare_by_identity;
25529 }
25530 else if (FLONUM_2_P(recv, obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 1))) == 0), 1)))) {
25531 goto compare_by_identity;
25532 }
25533 else if (RB_STATIC_SYM_P(recv) && RB_STATIC_SYM_P(obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 6))) == 0), 1)))) {
25534 goto compare_by_identity;
25535 }
25536 else if (RB_SPECIAL_CONST_P(recv)) {
25537 goto compare_by_funcall;
25538 }
25539 else if (RBASIC_CLASS(recv) == rb_cFloat && RB_FLOAT_TYPE_P(obj) && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 1))) == 0), 1)))) {
25540 double a = rb_float_value_inline(recv);
25541 double b = rb_float_value_inline(obj);
25542 if (a == b) {
25543 return ((VALUE)RUBY_Qtrue);
25544 }
25545 else {
25546 return ((VALUE)RUBY_Qfalse);
25547 }
25548 }
25549 else if (RBASIC_CLASS(recv) == rb_cString && ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQ)]&((1 << 2))) == 0), 1)))) {
25550 if (recv == obj) {
25551 return ((VALUE)RUBY_Qtrue);
25552 }
25553 else if ((__builtin_constant_p(RUBY_T_STRING) ? rbimpl_RB_TYPE_P_fastpath((obj), (RUBY_T_STRING)) : (RB_TYPE_P)((obj), (RUBY_T_STRING)))) {
25554 return rb_str_eql_internal(obj, recv);
25555 }
25556 }
25557
25558 compare_by_funcall:
25559 if (! vm_method_cfunc_is(cd_owner, cd, recv, rb_obj_equal)) {
25560 return ((VALUE)RUBY_Qundef);
25561 }
25562
25563 compare_by_identity:
25564 if (recv == obj) {
25565 return ((VALUE)RUBY_Qtrue);
25566 }
25567 else {
25568 return ((VALUE)RUBY_Qfalse);
25569 }
25570}
25571
25572extern VALUE rb_vm_call0(rb_execution_context_t *ec, VALUE, ID, int, const VALUE*, const rb_callable_method_entry_t *, int kw_splat);
25573
25574static VALUE
25575check_match(rb_execution_context_t *ec, VALUE pattern, VALUE target, enum vm_check_match_type type)
25576{
25577 switch (type) {
25578 case VM_CHECKMATCH_TYPE_WHEN:
25579 return pattern;
25580 case VM_CHECKMATCH_TYPE_RESCUE:
25581 if (!rb_obj_is_kind_of(pattern, rb_cModule)) {
25582 rb_raise(rb_eTypeError, "class or module required for rescue clause");
25583 }
25584
25585 case VM_CHECKMATCH_TYPE_CASE: {
25586 const rb_callable_method_entry_t *me =
25587 rb_callable_method_entry_with_refinements(rb_class_of(pattern), idEqq, ((void*)0));
25588 if (me) {
25589 return rb_vm_call0(ec, pattern, idEqq, 1, &target, me, 0);
25590 }
25591 else {
25592
25593 return rb_funcallv(pattern, idEqq, 1, &target);
25594 }
25595 }
25596 default:
25597 rb_bug("check_match: unreachable");
25598 }
25599}
25600
25601
25602
25603
25604
25605
25606
25607static inline VALUE
25608double_cmp_lt(double a, double b)
25609{
25610 ;
25611 return a < b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
25612}
25613
25614static inline VALUE
25615double_cmp_le(double a, double b)
25616{
25617 ;
25618 return a <= b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
25619}
25620
25621static inline VALUE
25622double_cmp_gt(double a, double b)
25623{
25624 ;
25625 return a > b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
25626}
25627
25628static inline VALUE
25629double_cmp_ge(double a, double b)
25630{
25631 ;
25632 return a >= b ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
25633}
25634
25635static inline VALUE *
25636vm_base_ptr(const rb_control_frame_t *cfp)
25637{
25638 return cfp->__bp__;
25639
25640}
25641
25642
25643
25644
25645__declspec(noreturn) static void raise_argument_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const VALUE exc);
25646__declspec(noreturn) static void argument_arity_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int miss_argc, const int min_argc, const int max_argc);
25647__declspec(noreturn) static void argument_kw_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const char *error, const VALUE keys);
25648VALUE rb_keyword_error_new(const char *error, VALUE keys);
25649static VALUE method_missing(rb_execution_context_t *ec, VALUE obj, ID id, int argc, const VALUE *argv,
25650 enum method_missing_reason call_status, int kw_splat);
25651
25652__attribute__ ((__visibility__("default"))) extern
25653
25654const rb_callable_method_entry_t *rb_resolve_refined_method_callable(VALUE refinements, const rb_callable_method_entry_t *me);
25655
25656struct args_info {
25657
25658 VALUE *argv;
25659 int argc;
25660
25661
25662 int rest_index;
25663 int rest_dupped;
25664 const struct rb_callinfo_kwarg *kw_arg;
25665 VALUE *kw_argv;
25666 VALUE rest;
25667};
25668
25669enum arg_setup_type {
25670 arg_setup_method,
25671 arg_setup_block
25672};
25673
25674static inline void
25675arg_rest_dup(struct args_info *args)
25676{
25677 if (!args->rest_dupped) {
25678 args->rest = rb_ary_dup(args->rest);
25679 args->rest_dupped = 1;
25680 }
25681}
25682
25683static inline int
25684args_argc(struct args_info *args)
25685{
25686 if (args->rest == ((VALUE)RUBY_Qfalse)) {
25687 return args->argc;
25688 }
25689 else {
25690 return args->argc + RARRAY_LENINT(args->rest) - args->rest_index;
25691 }
25692}
25693
25694static inline void
25695args_extend(struct args_info *args, const int min_argc)
25696{
25697 int i;
25698
25699 if (args->rest) {
25700 arg_rest_dup(args);
25701 ((void)0);
25702 for (i=args->argc + RARRAY_LENINT(args->rest); i<min_argc; i++) {
25703 rb_ary_push(args->rest, ((VALUE)RUBY_Qnil));
25704 }
25705 }
25706 else {
25707 for (i=args->argc; i<min_argc; i++) {
25708 args->argv[args->argc++] = ((VALUE)RUBY_Qnil);
25709 }
25710 }
25711}
25712
25713static inline void
25714args_reduce(struct args_info *args, int over_argc)
25715{
25716 if (args->rest) {
25717 const long len = rb_array_len(args->rest);
25718
25719 if (len > over_argc) {
25720 arg_rest_dup(args);
25721 rb_ary_resize(args->rest, len - over_argc);
25722 return;
25723 }
25724 else {
25725 args->rest = ((VALUE)RUBY_Qfalse);
25726 over_argc -= len;
25727 }
25728 }
25729
25730 ((void)0);
25731 args->argc -= over_argc;
25732}
25733
25734static inline int
25735args_check_block_arg0(struct args_info *args)
25736{
25737 VALUE ary = ((VALUE)RUBY_Qnil);
25738
25739 if (args->rest && rb_array_len(args->rest) == 1) {
25740 VALUE arg0 = RARRAY_AREF(args->rest, 0);
25741 ary = rb_check_array_type(arg0);
25742 }
25743 else if (args->argc == 1) {
25744 VALUE arg0 = args->argv[0];
25745 ary = rb_check_array_type(arg0);
25746 args->argv[0] = arg0;
25747 }
25748
25749 if (!RB_NIL_P(ary)) {
25750 args->rest = ary;
25751 args->rest_index = 0;
25752 args->argc = 0;
25753 return 1;
25754 }
25755
25756 return 0;
25757}
25758
25759static inline void
25760args_copy(struct args_info *args)
25761{
25762 if (args->rest != ((VALUE)RUBY_Qfalse)) {
25763 int argc = args->argc;
25764 args->argc = 0;
25765 arg_rest_dup(args);
25766 while (args->rest_index > 0 && argc > 0) {
25767 RARRAY_ASET(args->rest, --args->rest_index, args->argv[--argc]);
25768 }
25769 while (argc > 0) {
25770 rb_ary_unshift(args->rest, args->argv[--argc]);
25771 }
25772 }
25773 else if (args->argc > 0) {
25774 args->rest = rb_ary_new_from_values(args->argc, args->argv);
25775 args->rest_index = 0;
25776 args->rest_dupped = 1;
25777 args->argc = 0;
25778 }
25779}
25780
25781static inline const VALUE *
25782args_rest_argv(struct args_info *args)
25783{
25784 return rb_array_const_ptr_transient(args->rest) + args->rest_index;
25785}
25786
25787static inline VALUE
25788args_rest_array(struct args_info *args)
25789{
25790 VALUE ary;
25791
25792 if (args->rest) {
25793 ary = rb_ary_behead(args->rest, args->rest_index);
25794 args->rest_index = 0;
25795 args->rest = 0;
25796 }
25797 else {
25798 ary = rb_ary_new();
25799 }
25800 return ary;
25801}
25802
25803static int
25804args_kw_argv_to_hash(struct args_info *args)
25805{
25806 const struct rb_callinfo_kwarg *kw_arg = args->kw_arg;
25807 const VALUE *const passed_keywords = kw_arg->keywords;
25808 const int kw_len = kw_arg->keyword_len;
25809 VALUE h = rb_hash_new_with_size(kw_len);
25810 const int kw_start = args->argc - kw_len;
25811 const VALUE * const kw_argv = args->argv + kw_start;
25812 int i;
25813
25814 args->argc = kw_start + 1;
25815 for (i=0; i<kw_len; i++) {
25816 rb_hash_aset(h, passed_keywords[i], kw_argv[i]);
25817 }
25818
25819 args->argv[args->argc - 1] = h;
25820
25821 return args->argc;
25822}
25823
25824static inline void
25825args_setup_lead_parameters(struct args_info *args, int argc, VALUE *locals)
25826{
25827 if (args->argc >= argc) {
25828
25829 args->argc -= argc;
25830 args->argv += argc;
25831 }
25832 else {
25833 int i, j;
25834 const VALUE *argv = args_rest_argv(args);
25835
25836 for (i=args->argc, j=0; i<argc; i++, j++) {
25837 locals[i] = argv[j];
25838 }
25839 args->rest_index += argc - args->argc;
25840 args->argc = 0;
25841 }
25842}
25843
25844static inline void
25845args_setup_post_parameters(struct args_info *args, int argc, VALUE *locals)
25846{
25847 long len;
25848 len = rb_array_len(args->rest);
25849 ruby_nonempty_memcpy((locals), (rb_array_const_ptr_transient(args->rest) + len - argc), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc)));
25850 rb_ary_resize(args->rest, len - argc);
25851}
25852
25853static inline int
25854args_setup_opt_parameters(struct args_info *args, int opt_max, VALUE *locals)
25855{
25856 int i;
25857
25858 if (args->argc >= opt_max) {
25859 args->argc -= opt_max;
25860 args->argv += opt_max;
25861 i = opt_max;
25862 }
25863 else {
25864 int j;
25865 i = args->argc;
25866 args->argc = 0;
25867
25868 if (args->rest) {
25869 int len = RARRAY_LENINT(args->rest);
25870 const VALUE *argv = rb_array_const_ptr_transient(args->rest);
25871
25872 for (; i<opt_max && args->rest_index < len; i++, args->rest_index++) {
25873 locals[i] = argv[args->rest_index];
25874 }
25875 }
25876
25877
25878 for (j=i; j<opt_max; j++) {
25879 locals[j] = ((VALUE)RUBY_Qnil);
25880 }
25881 }
25882
25883 return i;
25884}
25885
25886static inline void
25887args_setup_rest_parameter(struct args_info *args, VALUE *locals)
25888{
25889 *locals = args_rest_array(args);
25890}
25891
25892static VALUE
25893make_unknown_kw_hash(const VALUE *passed_keywords, int passed_keyword_len, const VALUE *kw_argv)
25894{
25895 int i;
25896 VALUE obj = rb_ary_tmp_new(1);
25897
25898 for (i=0; i<passed_keyword_len; i++) {
25899 if (kw_argv[i] != ((VALUE)RUBY_Qundef)) {
25900 rb_ary_push(obj, passed_keywords[i]);
25901 }
25902 }
25903 return obj;
25904}
25905
25906static VALUE
25907make_rest_kw_hash(const VALUE *passed_keywords, int passed_keyword_len, const VALUE *kw_argv)
25908{
25909 int i;
25910 VALUE obj = rb_hash_new_with_size(passed_keyword_len);
25911
25912 for (i=0; i<passed_keyword_len; i++) {
25913 if (kw_argv[i] != ((VALUE)RUBY_Qundef)) {
25914 rb_hash_aset(obj, passed_keywords[i], kw_argv[i]);
25915 }
25916 }
25917 return obj;
25918}
25919
25920static inline int
25921args_setup_kw_parameters_lookup(const ID key, VALUE *ptr, const VALUE *const passed_keywords, VALUE *passed_values, const int passed_keyword_len)
25922{
25923 int i;
25924 const VALUE keyname = rb_id2sym(key);
25925
25926 for (i=0; i<passed_keyword_len; i++) {
25927 if (keyname == passed_keywords[i]) {
25928 *ptr = passed_values[i];
25929 passed_values[i] = ((VALUE)RUBY_Qundef);
25930 return 1;
25931 }
25932 }
25933
25934 return 0;
25935}
25936
25937
25938static void
25939args_setup_kw_parameters(rb_execution_context_t *const ec, const rb_iseq_t *const iseq,
25940 VALUE *const passed_values, const int passed_keyword_len, const VALUE *const passed_keywords,
25941 VALUE *const locals)
25942{
25943 const ID *acceptable_keywords = iseq->body->param.keyword->table;
25944 const int req_key_num = iseq->body->param.keyword->required_num;
25945 const int key_num = iseq->body->param.keyword->num;
25946 const VALUE * const default_values = iseq->body->param.keyword->default_values;
25947 VALUE missing = 0;
25948 int i, di, found = 0;
25949 int unspecified_bits = 0;
25950 VALUE unspecified_bits_value = ((VALUE)RUBY_Qnil);
25951
25952 for (i=0; i<req_key_num; i++) {
25953 ID key = acceptable_keywords[i];
25954 if (args_setup_kw_parameters_lookup(key, &locals[i], passed_keywords, passed_values, passed_keyword_len)) {
25955 found++;
25956 }
25957 else {
25958 if (!missing) missing = rb_ary_tmp_new(1);
25959 rb_ary_push(missing, rb_id2sym(key));
25960 }
25961 }
25962
25963 if (missing) argument_kw_error(ec, iseq, "missing", missing);
25964
25965 for (di=0; i<key_num; i++, di++) {
25966 if (args_setup_kw_parameters_lookup(acceptable_keywords[i], &locals[i], passed_keywords, passed_values, passed_keyword_len)) {
25967 found++;
25968 }
25969 else {
25970 if (default_values[di] == ((VALUE)RUBY_Qundef)) {
25971 locals[i] = ((VALUE)RUBY_Qnil);
25972
25973 if ((__builtin_expect(!!(i < (32-1)), 1))) {
25974 unspecified_bits |= 0x01 << di;
25975 }
25976 else {
25977 if (RB_NIL_P(unspecified_bits_value)) {
25978
25979 int j;
25980 unspecified_bits_value = rb_hash_new();
25981
25982 for (j=0; j<(32-1); j++) {
25983 if (unspecified_bits & (0x01 << j)) {
25984 rb_hash_aset(unspecified_bits_value, __builtin_choose_expr( __builtin_constant_p(j), ((VALUE)(j)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(j)), ((VALUE)RUBY_Qtrue));
25985 }
25986 }
25987 }
25988 rb_hash_aset(unspecified_bits_value, __builtin_choose_expr( __builtin_constant_p(di), ((VALUE)(di)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(di)), ((VALUE)RUBY_Qtrue));
25989 }
25990 }
25991 else {
25992 locals[i] = default_values[di];
25993 }
25994 }
25995 }
25996
25997 if (iseq->body->param.flags.has_kwrest) {
25998 const int rest_hash_index = key_num + 1;
25999 locals[rest_hash_index] = make_rest_kw_hash(passed_keywords, passed_keyword_len, passed_values);
26000 }
26001 else {
26002 if (found != passed_keyword_len) {
26003 VALUE keys = make_unknown_kw_hash(passed_keywords, passed_keyword_len, passed_values);
26004 argument_kw_error(ec, iseq, "unknown", keys);
26005 }
26006 }
26007
26008 if (RB_NIL_P(unspecified_bits_value)) {
26009 unspecified_bits_value = __builtin_choose_expr( __builtin_constant_p(unspecified_bits), ((VALUE)(unspecified_bits)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(unspecified_bits));
26010 }
26011 locals[key_num] = unspecified_bits_value;
26012}
26013
26014static inline void
26015args_setup_kw_rest_parameter(VALUE keyword_hash, VALUE *locals, int kw_flag)
26016{
26017 if (RB_NIL_P(keyword_hash)) {
26018 keyword_hash = rb_hash_new();
26019 }
26020 else if (!(kw_flag & (0x01 << VM_CALL_KW_SPLAT_MUT_bit))) {
26021 keyword_hash = rb_hash_dup(keyword_hash);
26022 }
26023 locals[0] = keyword_hash;
26024}
26025
26026static inline void
26027args_setup_block_parameter(const rb_execution_context_t *ec, struct rb_calling_info *calling, VALUE *locals)
26028{
26029 VALUE block_handler = calling->block_handler;
26030 *locals = rb_vm_bh_to_procval(ec, block_handler);
26031}
26032
26033struct fill_values_arg {
26034 VALUE *keys;
26035 VALUE *vals;
26036 int argc;
26037};
26038
26039static int
26040fill_keys_values(st_data_t key, st_data_t val, st_data_t ptr)
26041{
26042 struct fill_values_arg *arg = (struct fill_values_arg *)ptr;
26043 int i = arg->argc++;
26044 arg->keys[i] = (VALUE)key;
26045 arg->vals[i] = (VALUE)val;
26046 return ST_CONTINUE;
26047}
26048
26049static inline int
26050ignore_keyword_hash_p(VALUE keyword_hash, const rb_iseq_t * const iseq, unsigned int * kw_flag, VALUE * converted_keyword_hash)
26051{
26052 if (!(__builtin_constant_p(RUBY_T_HASH) ? rbimpl_RB_TYPE_P_fastpath((keyword_hash), (RUBY_T_HASH)) : (RB_TYPE_P)((keyword_hash), (RUBY_T_HASH)))) {
26053 keyword_hash = rb_to_hash_type(keyword_hash);
26054 }
26055 if (!(*kw_flag & (0x01 << VM_CALL_KW_SPLAT_MUT_bit)) &&
26056 (iseq->body->param.flags.has_kwrest ||
26057 iseq->body->param.flags.ruby2_keywords)) {
26058 *kw_flag |= (0x01 << VM_CALL_KW_SPLAT_MUT_bit);
26059 keyword_hash = rb_hash_dup(keyword_hash);
26060 }
26061 *converted_keyword_hash = keyword_hash;
26062 return !(iseq->body->param.flags.has_kw) &&
26063 !(iseq->body->param.flags.has_kwrest) &&
26064 RHASH_EMPTY_P(keyword_hash);
26065}
26066COLDFUNC static int
26067setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * const iseq,
26068 struct rb_calling_info *const calling,
26069 const struct rb_callinfo *ci,
26070 VALUE * const locals, const enum arg_setup_type arg_setup_type) {
26071 const int min_argc = iseq->body->param.lead_num + iseq->body->param.post_num;
26072 const int max_argc = (iseq->body->param.flags.has_rest == 0) ? min_argc + iseq->body->param.opt_num : (-1);
26073 int given_argc;
26074 unsigned int kw_flag = vm_ci_flag(ci) & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit));
26075 int opt_pc = 0, allow_autosplat = !kw_flag;
26076 struct args_info args_body, *args;
26077 VALUE keyword_hash = ((VALUE)RUBY_Qnil);
26078 VALUE * const orig_sp = ec->cfp->sp;
26079 unsigned int i;
26080 VALUE flag_keyword_hash = 0;
26081 VALUE converted_keyword_hash = 0;
26082
26083 ;
26084 for (i=calling->argc; i<iseq->body->param.size; i++) {
26085 locals[i] = ((VALUE)RUBY_Qnil);
26086 }
26087 ec->cfp->sp = &locals[i];
26088
26089
26090 args = &args_body;
26091 given_argc = args->argc = calling->argc;
26092 args->argv = locals;
26093 args->rest_dupped = 0;
26094
26095 if (kw_flag & (0x01 << VM_CALL_KWARG_bit)) {
26096 args->kw_arg = vm_ci_kwarg(ci);
26097
26098 if (iseq->body->param.flags.has_kw) {
26099 int kw_len = args->kw_arg->keyword_len;
26100
26101 args->kw_argv = ((VALUE *) __builtin_alloca_with_align( rbimpl_size_mul_or_raise(sizeof(VALUE), (kw_len)), __extension__ _Alignof(VALUE) * 8));
26102 args->argc -= kw_len;
26103 given_argc -= kw_len;
26104 ruby_nonempty_memcpy((args->kw_argv), (locals + args->argc), rbimpl_size_mul_or_raise(sizeof(VALUE), (kw_len)));
26105 }
26106 else {
26107 args->kw_argv = ((void*)0);
26108 given_argc = args_kw_argv_to_hash(args);
26109 kw_flag |= (0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit);
26110 }
26111 }
26112 else {
26113 args->kw_arg = ((void*)0);
26114 args->kw_argv = ((void*)0);
26115 }
26116
26117 if (vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) {
26118 VALUE rest_last = 0;
26119 int len;
26120 args->rest = locals[--args->argc];
26121 args->rest_index = 0;
26122 len = RARRAY_LENINT(args->rest);
26123 given_argc += len - 1;
26124 rest_last = RARRAY_AREF(args->rest, len - 1);
26125
26126 if (!kw_flag && len > 0) {
26127 if ((__builtin_constant_p(RUBY_T_HASH) ? rbimpl_RB_TYPE_P_fastpath((rest_last), (RUBY_T_HASH)) : (RB_TYPE_P)((rest_last), (RUBY_T_HASH))) &&
26128 (((struct RHash *)rest_last)->basic.flags & RHASH_PASS_AS_KEYWORDS)) {
26129 rest_last = rb_hash_dup(rest_last);
26130 kw_flag |= (0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit);
26131 }
26132 else {
26133 rest_last = 0;
26134 }
26135 }
26136
26137 if (kw_flag & (0x01 << VM_CALL_KW_SPLAT_bit)) {
26138 if (ignore_keyword_hash_p(rest_last, iseq, &kw_flag, &converted_keyword_hash)) {
26139 arg_rest_dup(args);
26140 rb_ary_pop(args->rest);
26141 given_argc--;
26142 kw_flag &= ~((0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit));
26143 }
26144 else {
26145 if (rest_last != converted_keyword_hash) {
26146 rest_last = converted_keyword_hash;
26147 arg_rest_dup(args);
26148 RARRAY_ASET(args->rest, len - 1, rest_last);
26149 }
26150
26151 if (iseq->body->param.flags.ruby2_keywords && rest_last) {
26152 flag_keyword_hash = rest_last;
26153 }
26154 else if (iseq->body->param.flags.has_kw || iseq->body->param.flags.has_kwrest) {
26155 arg_rest_dup(args);
26156 rb_ary_pop(args->rest);
26157 given_argc--;
26158 keyword_hash = rest_last;
26159 }
26160 }
26161 }
26162 }
26163 else {
26164 if (kw_flag & (0x01 << VM_CALL_KW_SPLAT_bit)) {
26165 VALUE last_arg = args->argv[args->argc-1];
26166 if (ignore_keyword_hash_p(last_arg, iseq, &kw_flag, &converted_keyword_hash)) {
26167 args->argc--;
26168 given_argc--;
26169 kw_flag &= ~((0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_MUT_bit));
26170 }
26171 else {
26172 if (last_arg != converted_keyword_hash) {
26173 last_arg = converted_keyword_hash;
26174 args->argv[args->argc-1] = last_arg;
26175 }
26176
26177 if (iseq->body->param.flags.ruby2_keywords) {
26178 flag_keyword_hash = last_arg;
26179 }
26180 else if (iseq->body->param.flags.has_kw || iseq->body->param.flags.has_kwrest) {
26181 args->argc--;
26182 given_argc--;
26183 keyword_hash = last_arg;
26184 }
26185 }
26186 }
26187 args->rest = ((VALUE)RUBY_Qfalse);
26188 }
26189
26190 if (flag_keyword_hash && (__builtin_constant_p(RUBY_T_HASH) ? rbimpl_RB_TYPE_P_fastpath((flag_keyword_hash), (RUBY_T_HASH)) : (RB_TYPE_P)((flag_keyword_hash), (RUBY_T_HASH)))) {
26191 ((struct RHash *)flag_keyword_hash)->basic.flags |= RHASH_PASS_AS_KEYWORDS;
26192 }
26193
26194 if (kw_flag && iseq->body->param.flags.accepts_no_kwarg) {
26195 rb_raise(rb_eArgError, "no keywords accepted");
26196 }
26197
26198
26199 switch (arg_setup_type) {
26200 case arg_setup_method:
26201 break;
26202 case arg_setup_block:
26203 if (given_argc == (keyword_hash == ((VALUE)RUBY_Qnil) ? 1 : 2) &&
26204 allow_autosplat &&
26205 (min_argc > 0 || iseq->body->param.opt_num > 1) &&
26206 !iseq->body->param.flags.ambiguous_param0 &&
26207 args_check_block_arg0(args)) {
26208 given_argc = RARRAY_LENINT(args->rest);
26209 }
26210 break;
26211 }
26212
26213
26214 if (given_argc < min_argc) {
26215 if (arg_setup_type == arg_setup_block) {
26216 do { __extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (sizeof(*((ec->cfp)->sp)) == sizeof(VALUE)) ? 2 : -1; })]; __extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (sizeof(*((ec->cfp))) == sizeof(rb_control_frame_t)) ? 2 : -1; })]; const struct rb_control_frame_struct *bound = (void *)&((ec->cfp)->sp)[((min_argc))]; if ((__builtin_expect(!!(((ec->cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
26217 given_argc = min_argc;
26218 args_extend(args, min_argc);
26219 }
26220 else {
26221 argument_arity_error(ec, iseq, given_argc, min_argc, max_argc);
26222 }
26223 }
26224
26225 if (given_argc > max_argc && max_argc != (-1)) {
26226 if (arg_setup_type == arg_setup_block) {
26227
26228 args_reduce(args, given_argc - max_argc);
26229 given_argc = max_argc;
26230 }
26231 else {
26232 argument_arity_error(ec, iseq, given_argc, min_argc, max_argc);
26233 }
26234 }
26235
26236 if (iseq->body->param.flags.has_lead) {
26237 args_setup_lead_parameters(args, iseq->body->param.lead_num, locals + 0);
26238 }
26239
26240 if (iseq->body->param.flags.has_rest || iseq->body->param.flags.has_post){
26241 args_copy(args);
26242 }
26243
26244 if (iseq->body->param.flags.has_post) {
26245 args_setup_post_parameters(args, iseq->body->param.post_num, locals + iseq->body->param.post_start);
26246 }
26247
26248 if (iseq->body->param.flags.has_opt) {
26249 int opt = args_setup_opt_parameters(args, iseq->body->param.opt_num, locals + iseq->body->param.lead_num);
26250 opt_pc = (int)iseq->body->param.opt_table[opt];
26251 }
26252
26253 if (iseq->body->param.flags.has_rest) {
26254 args_setup_rest_parameter(args, locals + iseq->body->param.rest_start);
26255 }
26256
26257 if (iseq->body->param.flags.has_kw) {
26258 VALUE * const klocals = locals + iseq->body->param.keyword->bits_start - iseq->body->param.keyword->num;
26259
26260 if (args->kw_argv != ((void*)0)) {
26261 const struct rb_callinfo_kwarg *kw_arg = args->kw_arg;
26262 args_setup_kw_parameters(ec, iseq, args->kw_argv, kw_arg->keyword_len, kw_arg->keywords, klocals);
26263 }
26264 else if (!RB_NIL_P(keyword_hash)) {
26265 int kw_len = rb_long2int_inline(RHASH_SIZE(keyword_hash));
26266 struct fill_values_arg arg;
26267
26268 arg.keys = args->kw_argv = ((VALUE *) __builtin_alloca_with_align( rbimpl_size_mul_or_raise(sizeof(VALUE), (kw_len * 2)), __extension__ _Alignof(VALUE) * 8));
26269 arg.vals = arg.keys + kw_len;
26270 arg.argc = 0;
26271 rb_hash_foreach(keyword_hash, fill_keys_values, (VALUE)&arg);
26272 ((void)0);
26273 args_setup_kw_parameters(ec, iseq, arg.vals, kw_len, arg.keys, klocals);
26274 }
26275 else {
26276 ((void)0);
26277 args_setup_kw_parameters(ec, iseq, ((void*)0), 0, ((void*)0), klocals);
26278 }
26279 }
26280 else if (iseq->body->param.flags.has_kwrest) {
26281 args_setup_kw_rest_parameter(keyword_hash, locals + iseq->body->param.keyword->rest_start, kw_flag);
26282 }
26283 else if (!RB_NIL_P(keyword_hash) && RHASH_SIZE(keyword_hash) > 0 && arg_setup_type == arg_setup_method) {
26284 argument_kw_error(ec, iseq, "unknown", rb_hash_keys(keyword_hash));
26285 }
26286
26287 if (iseq->body->param.flags.has_block) {
26288 if (iseq->body->local_iseq == iseq) {
26289
26290 }
26291 else {
26292 args_setup_block_parameter(ec, calling, locals + iseq->body->param.block_start);
26293 }
26294 }
26295 ec->cfp->sp = orig_sp;
26296 return opt_pc;
26297}
26298
26299void rb_backtrace_use_iseq_first_lineno_for_last_location(VALUE self);
26300
26301static void
26302raise_argument_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const VALUE exc)
26303{
26304 VALUE at;
26305
26306 if (iseq) {
26307 vm_push_frame(ec, iseq, VM_FRAME_MAGIC_DUMMY | VM_ENV_FLAG_LOCAL, ((VALUE)RUBY_Qnil) ,
26308 0 , ((VALUE)RUBY_Qfalse) ,
26309 iseq->body->iseq_encoded,
26310 ec->cfp->sp, 0, 0 );
26311 at = rb_ec_backtrace_object(ec);
26312 rb_backtrace_use_iseq_first_lineno_for_last_location(at);
26313 rb_vm_pop_frame(ec);
26314 }
26315 else {
26316 at = rb_ec_backtrace_object(ec);
26317 }
26318
26319 rb_ivar_set(exc, idBt_locations, at);
26320 rb_exc_set_backtrace(exc, at);
26321 rb_exc_raise(exc);
26322}
26323
26324static void
26325argument_arity_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int miss_argc, const int min_argc, const int max_argc)
26326{
26327 VALUE exc = rb_arity_error_new(miss_argc, min_argc, max_argc);
26328 if (iseq->body->param.flags.has_kw) {
26329 const struct rb_iseq_param_keyword *const kw = iseq->body->param.keyword;
26330 const ID *keywords = kw->table;
26331 int req_key_num = kw->required_num;
26332 if (req_key_num > 0) {
26333 static const char required[] = "; required keywords";
26334 VALUE mesg = rb_attr_get(exc, idMesg);
26335 rb_str_resize(mesg, RSTRING_LEN(mesg)-1);
26336 rb_str_cat(mesg, required, sizeof(required) - 1 - (req_key_num == 1));
26337 ((__builtin_constant_p(":") ? rbimpl_str_cat_cstr : rb_str_cat_cstr) ((mesg), (":")));
26338 do {
26339 ((__builtin_constant_p(" ") ? rbimpl_str_cat_cstr : rb_str_cat_cstr) ((mesg), (" ")));
26340 rb_str_append(mesg, rb_id2str(*keywords++));
26341 ((__builtin_constant_p(",") ? rbimpl_str_cat_cstr : rb_str_cat_cstr) ((mesg), (",")));
26342 } while (--req_key_num);
26343 RSTRING_PTR(mesg)[RSTRING_LEN(mesg)-1] = ')';
26344 }
26345 }
26346 raise_argument_error(ec, iseq, exc);
26347}
26348
26349static void
26350argument_kw_error(rb_execution_context_t *ec, const rb_iseq_t *iseq, const char *error, const VALUE keys)
26351{
26352 raise_argument_error(ec, iseq, rb_keyword_error_new(error, keys));
26353}
26354
26355static inline void
26356vm_caller_setup_arg_splat(rb_control_frame_t *cfp, struct rb_calling_info *calling)
26357{
26358 int argc = calling->argc;
26359 VALUE *argv = cfp->sp - argc;
26360 VALUE ary = argv[argc-1];
26361
26362 ;
26363 cfp->sp--;
26364
26365 if (!RB_NIL_P(ary)) {
26366 const VALUE *ptr = rb_array_const_ptr_transient(ary);
26367 long len = rb_array_len(ary), i;
26368
26369 do { __extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (sizeof(*((cfp)->sp)) == sizeof(VALUE)) ? 2 : -1; })]; __extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (sizeof(*((cfp))) == sizeof(rb_control_frame_t)) ? 2 : -1; })]; const struct rb_control_frame_struct *bound = (void *)&((cfp)->sp)[((len))]; if ((__builtin_expect(!!(((cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
26370
26371 for (i = 0; i < len; i++) {
26372 *cfp->sp++ = ptr[i];
26373 }
26374 calling->argc += i - 1;
26375 }
26376}
26377
26378static inline void
26379vm_caller_setup_arg_kw(rb_control_frame_t *cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci)
26380{
26381 const VALUE *const passed_keywords = vm_ci_kwarg(ci)->keywords;
26382 const int kw_len = vm_ci_kwarg(ci)->keyword_len;
26383 const VALUE h = rb_hash_new_with_size(kw_len);
26384 VALUE *sp = cfp->sp;
26385 int i;
26386
26387 for (i=0; i<kw_len; i++) {
26388 rb_hash_aset(h, passed_keywords[i], (sp - kw_len)[i]);
26389 }
26390 (sp-kw_len)[0] = h;
26391
26392 cfp->sp -= kw_len - 1;
26393 calling->argc -= kw_len - 1;
26394 calling->kw_splat = 1;
26395}
26396
26397static VALUE
26398vm_to_proc(VALUE proc)
26399{
26400 if ((__builtin_expect(!!(!rb_obj_is_proc(proc)), 0))) {
26401 VALUE b;
26402 const rb_callable_method_entry_t *me =
26403 rb_callable_method_entry_with_refinements(rb_class_of(proc), idTo_proc, ((void*)0));
26404
26405 if (me) {
26406 b = rb_vm_call0(rb_current_execution_context(), proc, idTo_proc, 0, ((void*)0), me, 0);
26407 }
26408 else {
26409
26410 b = rb_check_convert_type_with_id(proc, RUBY_T_DATA, "Proc", idTo_proc);
26411 }
26412
26413 if (RB_NIL_P(b) || !rb_obj_is_proc(b)) {
26414 rb_raise(rb_eTypeError,
26415 "wrong argument type %s (expected Proc)",
26416 rb_obj_classname(proc));
26417 }
26418 return b;
26419 }
26420 else {
26421 return proc;
26422 }
26423}
26424
26425static VALUE
26426refine_sym_proc_call(VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg)
26427{
26428 VALUE obj;
26429 ID mid;
26430 const rb_callable_method_entry_t *me = 0;
26432 const VALUE symbol = RARRAY_AREF(callback_arg, 0);
26433 const VALUE refinements = RARRAY_AREF(callback_arg, 1);
26434 int kw_splat = rb_keyword_given_p();
26435 VALUE klass;
26436
26437 if (argc-- < 1) {
26438 rb_raise(rb_eArgError, "no receiver given");
26439 }
26440 obj = *argv++;
26441
26442 mid = rb_sym2id(symbol);
26443 for (klass = rb_class_of(obj); klass; klass = RCLASS_SUPER(klass)) {
26444 me = rb_callable_method_entry(klass, mid);
26445 if (me) {
26446 me = rb_resolve_refined_method_callable(refinements, me);
26447 if (me) break;
26448 }
26449 }
26450
26451 ec = rb_current_execution_context();
26452 if (!RB_NIL_P(blockarg)) {
26453 vm_passed_block_handler_set(ec, blockarg);
26454 }
26455 if (!me) {
26456 return method_missing(ec, obj, mid, argc, argv, MISSING_NOENTRY, kw_splat);
26457 }
26458 return rb_vm_call0(ec, obj, mid, argc, argv, me, kw_splat);
26459}
26460
26461static VALUE
26462vm_caller_setup_arg_block(const rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
26463 const struct rb_callinfo *ci, const rb_iseq_t *blockiseq, const int is_super)
26464{
26465 if (vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_BLOCKARG_bit)) {
26466 VALUE block_code = *(--reg_cfp->sp);
26467
26468 if (RB_NIL_P(block_code)) {
26469 return 0;
26470 }
26471 else if (block_code == rb_block_param_proxy) {
26472 ((void)0);
26473 VALUE handler = VM_CF_BLOCK_HANDLER(reg_cfp);
26474 reg_cfp->block_code = (const void *) handler;
26475 return handler;
26476 }
26477 else if (RB_SYMBOL_P(block_code) && rb_method_basic_definition_p(rb_cSymbol, idTo_proc)) {
26478 const rb_cref_t *cref = vm_env_cref(reg_cfp->ep);
26479 if (cref && !RB_NIL_P(cref->refinements)) {
26480 VALUE ref = cref->refinements;
26481 VALUE func = rb_hash_lookup(ref, block_code);
26482 if (RB_NIL_P(func)) {
26483
26484 VALUE callback_arg = rb_ary_tmp_new(2);
26485 rb_ary_push(callback_arg, block_code);
26486 rb_ary_push(callback_arg, ref);
26487 RB_OBJ_FREEZE_RAW(callback_arg);
26488 func = rb_func_lambda_new(refine_sym_proc_call, callback_arg, 1, (-1));
26489 rb_hash_aset(ref, block_code, func);
26490 }
26491 block_code = func;
26492 }
26493 return block_code;
26494 }
26495 else {
26496 return vm_to_proc(block_code);
26497 }
26498 }
26499 else if (blockiseq != ((void*)0)) {
26500 struct rb_captured_block *captured = VM_CFP_TO_CAPTURED_BLOCK(reg_cfp);
26501 captured->code.iseq = blockiseq;
26502 return VM_BH_FROM_ISEQ_BLOCK(captured);
26503 }
26504 else {
26505 if (is_super) {
26506 return ((VM_EP_LEP(((((reg_cfp)->ep)))))[(-1)]);
26507 }
26508 else {
26509 return 0;
26510 }
26511 }
26512}
26513
26514static inline VALUE vm_call_iseq_setup_2(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd, int opt_pc, int param_size, int local_size);
26515__attribute__ ((__always_inline__)) static VALUE vm_call_iseq_setup_normal(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const rb_callable_method_entry_t *me, int opt_pc, int param_size, int local_size);
26516static inline VALUE vm_call_iseq_setup_tailcall(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd, int opt_pc);
26517static VALUE vm_call_super_method(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd);
26518static VALUE vm_call_method_nome(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd);
26519static VALUE vm_call_method_each_type(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd);
26520static inline VALUE vm_call_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd);
26521
26522static vm_call_handler vm_call_iseq_setup_func(const struct rb_callinfo *ci, const int param_size, const int local_size);
26523
26524static VALUE
26525vm_call_iseq_setup_tailcall_0start(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
26526{
26527 ((void)0);
26528
26529 return vm_call_iseq_setup_tailcall(ec, cfp, calling, cd, 0);
26530}
26531
26532static VALUE
26533vm_call_iseq_setup_normal_0start(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
26534{
26535 ((void)0);
26536
26537 const struct rb_callcache *cc = cd->cc;
26538 const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def);
26539 int param = iseq->body->param.size;
26540 int local = iseq->body->local_table_size;
26541 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), 0, param, local);
26542}
26543
26544static _Bool
26545rb_simple_iseq_p(const rb_iseq_t *iseq)
26546{
26547 return iseq->body->param.flags.has_opt == 0 &&
26548 iseq->body->param.flags.has_rest == 0 &&
26549 iseq->body->param.flags.has_post == 0 &&
26550 iseq->body->param.flags.has_kw == 0 &&
26551 iseq->body->param.flags.has_kwrest == 0 &&
26552 iseq->body->param.flags.accepts_no_kwarg == 0 &&
26553 iseq->body->param.flags.has_block == 0;
26554}
26555
26556static _Bool
26557rb_iseq_only_optparam_p(const rb_iseq_t *iseq)
26558{
26559 return iseq->body->param.flags.has_opt == 1 &&
26560 iseq->body->param.flags.has_rest == 0 &&
26561 iseq->body->param.flags.has_post == 0 &&
26562 iseq->body->param.flags.has_kw == 0 &&
26563 iseq->body->param.flags.has_kwrest == 0 &&
26564 iseq->body->param.flags.accepts_no_kwarg == 0 &&
26565 iseq->body->param.flags.has_block == 0;
26566}
26567
26568static _Bool
26569rb_iseq_only_kwparam_p(const rb_iseq_t *iseq)
26570{
26571 return iseq->body->param.flags.has_opt == 0 &&
26572 iseq->body->param.flags.has_rest == 0 &&
26573 iseq->body->param.flags.has_post == 0 &&
26574 iseq->body->param.flags.has_kw == 1 &&
26575 iseq->body->param.flags.has_kwrest == 0 &&
26576 iseq->body->param.flags.has_block == 0;
26577}
26578
26579
26580static _Bool
26581rb_splat_or_kwargs_p(const struct rb_callinfo *__restrict ci)
26582{
26583 return (vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) || (vm_ci_flag(ci) & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit)));
26584}
26585
26586
26587static inline void
26588CALLER_SETUP_ARG(struct rb_control_frame_struct *__restrict cfp,
26589 struct rb_calling_info *__restrict calling,
26590 const struct rb_callinfo *__restrict ci)
26591{
26592 if ((__builtin_expect(!!((vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit))), 0))) {
26593 VALUE final_hash;
26594
26595
26596
26597 vm_caller_setup_arg_splat(cfp, calling);
26598 if (!(vm_ci_flag(ci) & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit))) &&
26599 calling->argc > 0 &&
26600 (__builtin_constant_p(RUBY_T_HASH) ? rbimpl_RB_TYPE_P_fastpath(((final_hash = *(cfp->sp - 1))), (RUBY_T_HASH)) : (RB_TYPE_P)(((final_hash = *(cfp->sp - 1))), (RUBY_T_HASH))) &&
26601 (((struct RHash *)final_hash)->basic.flags & RHASH_PASS_AS_KEYWORDS)) {
26602 *(cfp->sp - 1) = rb_hash_dup(final_hash);
26603 calling->kw_splat = 1;
26604 }
26605 }
26606 if ((__builtin_expect(!!((vm_ci_flag(ci) & ((0x01 << VM_CALL_KWARG_bit) | (0x01 << VM_CALL_KW_SPLAT_bit)))), 0))) {
26607 if ((vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit))) {
26608
26609
26610
26611
26612 vm_caller_setup_arg_kw(cfp, calling, ci);
26613 }
26614 else {
26615 VALUE keyword_hash = cfp->sp[-1];
26616 if (!(__builtin_constant_p(RUBY_T_HASH) ? rbimpl_RB_TYPE_P_fastpath((keyword_hash), (RUBY_T_HASH)) : (RB_TYPE_P)((keyword_hash), (RUBY_T_HASH)))) {
26617
26618 cfp->sp[-1] = rb_hash_dup(rb_to_hash_type(keyword_hash));
26619 }
26620 else if (!(vm_ci_flag(ci) & (0x01 << VM_CALL_KW_SPLAT_MUT_bit))) {
26621
26622
26623
26624 cfp->sp[-1] = rb_hash_dup(keyword_hash);
26625 }
26626 }
26627 }
26628}
26629
26630static inline void
26631CALLER_REMOVE_EMPTY_KW_SPLAT(struct rb_control_frame_struct *__restrict cfp,
26632 struct rb_calling_info *__restrict calling,
26633 const struct rb_callinfo *__restrict ci)
26634{
26635 if ((__builtin_expect(!!(calling->kw_splat), 0))) {
26636 if (RHASH_EMPTY_P(cfp->sp[-1])) {
26637 cfp->sp--;
26638 calling->argc--;
26639 calling->kw_splat = 0;
26640 }
26641 }
26642}
26643
26644static VALUE
26645vm_call_iseq_setup_normal_opt_start(rb_execution_context_t *ec, rb_control_frame_t *cfp,
26646 struct rb_calling_info *calling,
26647 struct rb_call_data *cd)
26648{
26649 const struct rb_callcache *cc = cd->cc;
26650 const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def);
26651 const int lead_num = iseq->body->param.lead_num;
26652 const int opt = calling->argc - lead_num;
26653 const int opt_num = iseq->body->param.opt_num;
26654 const int opt_pc = (int)iseq->body->param.opt_table[opt];
26655 const int param = iseq->body->param.size;
26656 const int local = iseq->body->local_table_size;
26657 const int delta = opt_num - opt;
26658
26659 ((void)0);
26660 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), opt_pc, param - delta, local);
26661}
26662
26663static VALUE
26664vm_call_iseq_setup_tailcall_opt_start(rb_execution_context_t *ec, rb_control_frame_t *cfp,
26665 struct rb_calling_info *calling,
26666 struct rb_call_data *cd)
26667{
26668 const struct rb_callcache *cc = cd->cc;
26669 const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def);
26670 const int lead_num = iseq->body->param.lead_num;
26671 const int opt = calling->argc - lead_num;
26672 const int opt_pc = (int)iseq->body->param.opt_table[opt];
26673
26674 ((void)0);
26675 return vm_call_iseq_setup_tailcall(ec, cfp, calling, cd, opt_pc);
26676}
26677
26678static void
26679args_setup_kw_parameters(rb_execution_context_t *const ec, const rb_iseq_t *const iseq,
26680 VALUE *const passed_values, const int passed_keyword_len, const VALUE *const passed_keywords,
26681 VALUE *const locals);
26682
26683static VALUE
26684vm_call_iseq_setup_kwparm_kwarg(rb_execution_context_t *ec, rb_control_frame_t *cfp,
26685 struct rb_calling_info *calling,
26686 struct rb_call_data *cd)
26687{
26688 const struct rb_callinfo *ci = cd->ci;
26689 const struct rb_callcache *cc = cd->cc;
26690
26691 ((void)0);
26692 ((void)0);
26693
26694 const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def);
26695 const struct rb_iseq_param_keyword *kw_param = iseq->body->param.keyword;
26696 const struct rb_callinfo_kwarg *kw_arg = vm_ci_kwarg(ci);
26697 const int ci_kw_len = kw_arg->keyword_len;
26698 const VALUE * const ci_keywords = kw_arg->keywords;
26699 VALUE *argv = cfp->sp - calling->argc;
26700 VALUE *const klocals = argv + kw_param->bits_start - kw_param->num;
26701 const int lead_num = iseq->body->param.lead_num;
26702 VALUE * const ci_kws = ((VALUE *) __builtin_alloca_with_align( rbimpl_size_mul_or_raise(sizeof(VALUE), (ci_kw_len)), __extension__ _Alignof(VALUE) * 8));
26703 ruby_nonempty_memcpy((ci_kws), (argv + lead_num), rbimpl_size_mul_or_raise(sizeof(VALUE), (ci_kw_len)));
26704 args_setup_kw_parameters(ec, iseq, ci_kws, ci_kw_len, ci_keywords, klocals);
26705
26706 int param = iseq->body->param.size;
26707 int local = iseq->body->local_table_size;
26708 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), 0, param, local);
26709}
26710
26711static VALUE
26712vm_call_iseq_setup_kwparm_nokwarg(rb_execution_context_t *ec, rb_control_frame_t *cfp,
26713 struct rb_calling_info *calling,
26714 struct rb_call_data *cd)
26715{
26716 const struct rb_callinfo *__attribute__ ((__unused__)) ci = cd->ci;
26717 const struct rb_callcache *cc = cd->cc;
26718
26719 ((void)0);
26720 ((void)0);
26721
26722 const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def);
26723 const struct rb_iseq_param_keyword *kw_param = iseq->body->param.keyword;
26724 VALUE * const argv = cfp->sp - calling->argc;
26725 VALUE * const klocals = argv + kw_param->bits_start - kw_param->num;
26726
26727 int i;
26728 for (i=0; i<kw_param->num; i++) {
26729 klocals[i] = kw_param->default_values[i];
26730 }
26731 klocals[i] = __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0));
26732
26733
26734
26735
26736 int param = iseq->body->param.size;
26737 int local = iseq->body->local_table_size;
26738 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), 0, param, local);
26739}
26740
26741static inline int
26742vm_callee_setup_arg(rb_execution_context_t *ec, struct rb_calling_info *calling, struct rb_call_data *cd,
26743 const rb_iseq_t *iseq, VALUE *argv, int param_size, int local_size)
26744{
26745 const struct rb_callinfo *ci = cd->ci;
26746 const struct rb_callcache *cc = cd->cc;
26747
26748 if ((__builtin_expect(!!(!(vm_ci_flag(ci) & (0x01 << VM_CALL_KW_SPLAT_bit))), 1))) {
26749 if ((__builtin_expect(!!(rb_simple_iseq_p(iseq)), 1))) {
26750 rb_control_frame_t *cfp = ec->cfp;
26751 CALLER_SETUP_ARG(cfp, calling, ci);
26752 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
26753
26754 if (calling->argc != iseq->body->param.lead_num) {
26755 argument_arity_error(ec, iseq, calling->argc, iseq->body->param.lead_num, iseq->body->param.lead_num);
26756 }
26757
26758 CC_SET_FASTPATH(cc, vm_call_iseq_setup_func(ci, param_size, local_size), vm_call_iseq_optimizable_p(cd->ci, cd->cc));
26759 return 0;
26760 }
26761 else if (rb_iseq_only_optparam_p(iseq)) {
26762 rb_control_frame_t *cfp = ec->cfp;
26763 CALLER_SETUP_ARG(cfp, calling, ci);
26764 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
26765
26766 const int lead_num = iseq->body->param.lead_num;
26767 const int opt_num = iseq->body->param.opt_num;
26768 const int argc = calling->argc;
26769 const int opt = argc - lead_num;
26770
26771 if (opt < 0 || opt > opt_num) {
26772 argument_arity_error(ec, iseq, argc, lead_num, lead_num + opt_num);
26773 }
26774
26775 if ((__builtin_expect(!!(!(vm_ci_flag(ci) & (0x01 << VM_CALL_TAILCALL_bit))), 1))) {
26776 CC_SET_FASTPATH(cc, vm_call_iseq_setup_normal_opt_start,
26777 !(vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !(vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit)) &&
26778 !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
26779 }
26780 else {
26781 CC_SET_FASTPATH(cc, vm_call_iseq_setup_tailcall_opt_start,
26782 !(vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit)) && !(vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit)) &&
26783 !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
26784 }
26785
26786
26787 ((void)0);
26788 for (int i=argc; i<lead_num + opt_num; i++) {
26789 argv[i] = ((VALUE)RUBY_Qnil);
26790 }
26791 return (int)iseq->body->param.opt_table[opt];
26792 }
26793 else if (rb_iseq_only_kwparam_p(iseq) && !(vm_ci_flag(ci) & (0x01 << VM_CALL_ARGS_SPLAT_bit))) {
26794 const int lead_num = iseq->body->param.lead_num;
26795 const int argc = calling->argc;
26796 const struct rb_iseq_param_keyword *kw_param = iseq->body->param.keyword;
26797
26798 if (vm_ci_flag(ci) & (0x01 << VM_CALL_KWARG_bit)) {
26799 const struct rb_callinfo_kwarg *kw_arg = vm_ci_kwarg(ci);
26800
26801 if (argc - kw_arg->keyword_len == lead_num) {
26802 const int ci_kw_len = kw_arg->keyword_len;
26803 const VALUE * const ci_keywords = kw_arg->keywords;
26804 VALUE * const ci_kws = ((VALUE *) __builtin_alloca_with_align( rbimpl_size_mul_or_raise(sizeof(VALUE), (ci_kw_len)), __extension__ _Alignof(VALUE) * 8));
26805 ruby_nonempty_memcpy((ci_kws), (argv + lead_num), rbimpl_size_mul_or_raise(sizeof(VALUE), (ci_kw_len)));
26806
26807 VALUE *const klocals = argv + kw_param->bits_start - kw_param->num;
26808 args_setup_kw_parameters(ec, iseq, ci_kws, ci_kw_len, ci_keywords, klocals);
26809
26810 CC_SET_FASTPATH(cc, vm_call_iseq_setup_kwparm_kwarg,
26811 !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
26812
26813 return 0;
26814 }
26815 }
26816 else if (argc == lead_num) {
26817
26818 VALUE *const klocals = argv + kw_param->bits_start - kw_param->num;
26819 args_setup_kw_parameters(ec, iseq, ((void*)0), 0, ((void*)0), klocals);
26820
26821 if (klocals[kw_param->num] == __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0))) {
26822
26823 CC_SET_FASTPATH(cc, vm_call_iseq_setup_kwparm_nokwarg,
26824 !((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)) == METHOD_VISI_PROTECTED));
26825 }
26826
26827 return 0;
26828 }
26829 }
26830 }
26831
26832 return setup_parameters_complex(ec, iseq, calling, ci, argv, arg_setup_method);
26833}
26834COLDFUNC static VALUE
26835vm_call_iseq_setup(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd) {
26836 ((void)0);
26837
26838 const struct rb_callcache *cc = cd->cc;
26839 const rb_iseq_t *iseq = def_iseq_ptr(vm_cc_cme(cc)->def);
26840 const int param_size = iseq->body->param.size;
26841 const int local_size = iseq->body->local_table_size;
26842 const int opt_pc = vm_callee_setup_arg(ec, calling, cd, def_iseq_ptr(vm_cc_cme(cc)->def), cfp->sp - calling->argc, param_size, local_size);
26843 return vm_call_iseq_setup_2(ec, cfp, calling, cd, opt_pc, param_size, local_size);
26844}
26845COLDFUNC static VALUE
26846vm_call_iseq_setup_2(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd,
26847 int opt_pc, int param_size, int local_size) {
26848 const struct rb_callinfo *ci = cd->ci;
26849 const struct rb_callcache *cc = cd->cc;
26850
26851 if ((__builtin_expect(!!(!(vm_ci_flag(ci) & (0x01 << VM_CALL_TAILCALL_bit))), 1))) {
26852 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cc), opt_pc, param_size, local_size);
26853 }
26854 else {
26855 return vm_call_iseq_setup_tailcall(ec, cfp, calling, cd, opt_pc);
26856 }
26857}
26858
26859static inline VALUE
26860vm_call_iseq_setup_normal(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, const rb_callable_method_entry_t *me,
26861 int opt_pc, int param_size, int local_size)
26862{
26863 const rb_iseq_t *iseq = def_iseq_ptr(me->def);
26864 VALUE *argv = cfp->sp - calling->argc;
26865 VALUE *sp = argv + param_size;
26866 cfp->sp = argv - 1 ;
26867
26868 vm_push_frame(ec, iseq, VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL, calling->recv,
26869 calling->block_handler, (VALUE)me,
26870 iseq->body->iseq_encoded + opt_pc, sp,
26871 local_size - param_size,
26872 iseq->body->stack_max);
26873 return ((VALUE)RUBY_Qundef);
26874}
26875COLDFUNC static VALUE
26876vm_call_iseq_setup_tailcall(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd,
26877 int opt_pc) {
26878 const struct rb_callcache *cc = cd->cc;
26879 unsigned int i;
26880 VALUE *argv = cfp->sp - calling->argc;
26881 const rb_callable_method_entry_t *me = vm_cc_cme(cc);
26882 const rb_iseq_t *iseq = def_iseq_ptr(me->def);
26883 VALUE *src_argv = argv;
26884 VALUE *sp_orig, *sp;
26885 VALUE finish_flag = VM_FRAME_FINISHED_P(cfp) ? VM_FRAME_FLAG_FINISH : 0;
26886
26887 if (VM_BH_FROM_CFP_P(calling->block_handler, cfp)) {
26888 struct rb_captured_block *dst_captured = VM_CFP_TO_CAPTURED_BLOCK(((cfp)+1));
26889 const struct rb_captured_block *src_captured = VM_BH_TO_CAPT_BLOCK(calling->block_handler);
26890 dst_captured->code.val = src_captured->code.val;
26891 if (VM_BH_ISEQ_BLOCK_P(calling->block_handler)) {
26892 calling->block_handler = VM_BH_FROM_ISEQ_BLOCK(dst_captured);
26893 }
26894 else {
26895 calling->block_handler = VM_BH_FROM_IFUNC_BLOCK(dst_captured);
26896 }
26897 }
26898
26899 vm_pop_frame(ec, cfp, cfp->ep);
26900 cfp = ec->cfp;
26901
26902 sp_orig = sp = cfp->sp;
26903
26904
26905 sp[0] = calling->recv;
26906 sp++;
26907
26908
26909 for (i=0; i < iseq->body->param.size; i++) {
26910 *sp++ = src_argv[i];
26911 }
26912
26913 vm_push_frame(ec, iseq, VM_FRAME_MAGIC_METHOD | VM_ENV_FLAG_LOCAL | finish_flag,
26914 calling->recv, calling->block_handler, (VALUE)me,
26915 iseq->body->iseq_encoded + opt_pc, sp,
26916 iseq->body->local_table_size - iseq->body->param.size,
26917 iseq->body->stack_max);
26918
26919 cfp->sp = sp_orig;
26920
26921 return ((VALUE)RUBY_Qundef);
26922}
26923
26924static VALUE
26925call_cfunc_m2(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
26926{
26927 return (*func)(recv, rb_ary_new_from_values(argc, argv));
26928}
26929
26930static VALUE
26931call_cfunc_m1(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
26932{
26933 return (*func)(argc, argv, recv);
26934}
26935
26936static VALUE
26937call_cfunc_0(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
26938{
26939 VALUE(*f)(VALUE) = (VALUE(*)(VALUE))func;
26940 return (*f)(recv);
26941}
26942static VALUE
26943call_cfunc_1(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
26944{
26945 VALUE(*f)(VALUE, VALUE) = (VALUE(*)(VALUE, VALUE))func;
26946 return (*f)(recv, argv[0]);
26947}
26948static VALUE
26949call_cfunc_2(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
26950{
26951 VALUE(*f)(VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE))func;
26952 return (*f)(recv, argv[0], argv[1]);
26953}
26954static VALUE
26955call_cfunc_3(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
26956{
26957 VALUE(*f)(VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE))func;
26958 return (*f)(recv, argv[0], argv[1], argv[2]);
26959}
26960static VALUE
26961call_cfunc_4(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
26962{
26963 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE))func;
26964 return (*f)(recv, argv[0], argv[1], argv[2], argv[3]);
26965}
26966static VALUE
26967call_cfunc_5(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
26968{
26969 VALUE(*f)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE) = (VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE))func;
26970 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4]);
26971}
26972static VALUE
26973call_cfunc_6(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
26974{
26976 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
26977}
26978static VALUE
26979call_cfunc_7(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
26980{
26982 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
26983}
26984static VALUE
26985call_cfunc_8(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
26986{
26988 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]);
26989}
26990static VALUE
26991call_cfunc_9(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
26992{
26994 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]);
26995}
26996static VALUE
26997call_cfunc_10(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
26998{
27000 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]);
27001}
27002static VALUE
27003call_cfunc_11(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
27004{
27006 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]);
27007}
27008static VALUE
27009call_cfunc_12(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
27010{
27012 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]);
27013}
27014static VALUE
27015call_cfunc_13(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
27016{
27018 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12]);
27019}
27020static VALUE
27021call_cfunc_14(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
27022{
27024 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13]);
27025}
27026static VALUE
27027call_cfunc_15(VALUE recv, int argc, const VALUE *argv, VALUE (*func)())
27028{
27030 return (*f)(recv, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14]);
27031}
27032
27033static inline int
27034vm_cfp_consistent_p(rb_execution_context_t *ec, const rb_control_frame_t *reg_cfp)
27035{
27036 const int ov_flags = RAISED_STACKOVERFLOW;
27037 if ((__builtin_expect(!!(reg_cfp == ec->cfp + 1), 1))) return 1;
27038 if ((((ec)->raised_flag & (ov_flags)) != 0)) {
27039 ((ec)->raised_flag &= ~(ov_flags));
27040 return 1;
27041 }
27042 return 0;
27043}
27044
27045
27046
27047
27048static inline
27049const rb_method_cfunc_t *
27050vm_method_cfunc_entry(const rb_callable_method_entry_t *me)
27051{
27052 return __extension__({
27053;
27054; __typeof__(&(me->def)->body.cfunc) unaligned_member_access_result = (&(me->def)->body.cfunc);
27055; unaligned_member_access_result; });
27056}
27057
27058static VALUE
27059vm_call_cfunc_with_frame(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
27060{
27061 ((void)0);
27062 const struct rb_callinfo *ci = cd->ci;
27063 const struct rb_callcache *cc = cd->cc;
27064 VALUE val;
27065 const rb_callable_method_entry_t *me = vm_cc_cme(cc);
27066 const rb_method_cfunc_t *cfunc = vm_method_cfunc_entry(me);
27067 int len = cfunc->argc;
27068
27069 VALUE recv = calling->recv;
27070 VALUE block_handler = calling->block_handler;
27071 VALUE frame_type = VM_FRAME_MAGIC_CFUNC | VM_FRAME_FLAG_CFRAME | VM_ENV_FLAG_LOCAL;
27072 int argc = calling->argc;
27073 int orig_argc = argc;
27074
27075 if ((__builtin_expect(!!(calling->kw_splat), 0))) {
27076 frame_type |= VM_FRAME_FLAG_CFRAME_KW;
27077 }
27078
27079 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0);
27080 do { const rb_event_flag_t flag_arg_ = (0x0020); rb_hook_list_t *hooks_arg_ = (rb_vm_global_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, recv, me->def->original_id, vm_ci_mid(ci), me->owner, ((VALUE)RUBY_Qundef), 0); } } while (0);
27081
27082 vm_push_frame(ec, ((void*)0), frame_type, recv,
27083 block_handler, (VALUE)me,
27084 0, ec->cfp->sp, 0, 0);
27085
27086 if (len >= 0) rb_check_arity(argc, len, len);
27087
27088 reg_cfp->sp -= orig_argc + 1;
27089 val = (*cfunc->invoker)(recv, argc, reg_cfp->sp + 1, cfunc->func);
27090
27091 ((__builtin_expect(!!(vm_cfp_consistent_p(ec, reg_cfp)), 1)) ? (void)0 : rb_bug("vm_call_cfunc" ": cfp consistency error (%p, %p)", (void *)reg_cfp, (void *)(ec->cfp+1)));
27092
27093 rb_vm_pop_frame(ec);
27094
27095 do { const rb_event_flag_t flag_arg_ = (0x0040); rb_hook_list_t *hooks_arg_ = (rb_vm_global_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, recv, me->def->original_id, vm_ci_mid(ci), me->owner, val, 0); } } while (0);
27096 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0);
27097
27098 return val;
27099}
27100
27101static VALUE
27102vm_call_cfunc(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
27103{
27104 const struct rb_callinfo *ci = cd->ci;
27105 ((void)0);
27106
27107 CALLER_SETUP_ARG(reg_cfp, calling, ci);
27108 CALLER_REMOVE_EMPTY_KW_SPLAT(reg_cfp, calling, ci);
27109 CC_SET_FASTPATH(cd->cc, vm_call_cfunc_with_frame, !rb_splat_or_kwargs_p(ci) && !calling->kw_splat);
27110 return vm_call_cfunc_with_frame(ec, reg_cfp, calling, cd);
27111}
27112
27113static VALUE
27114vm_call_ivar(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
27115{
27116 const struct rb_callcache *cc = cd->cc;
27117 ((void)0);
27118 cfp->sp -= 1;
27119 return vm_getivar(calling->recv, vm_cc_cme(cc)->def->body.attr.id, ((void*)0), cc, 1);
27120}
27121
27122static VALUE
27123vm_call_attrset(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
27124{
27125 const struct rb_callcache *cc = cd->cc;
27126 ((void)0);
27127 VALUE val = *(cfp->sp - 1);
27128 cfp->sp -= 2;
27129 return vm_setivar(calling->recv, vm_cc_cme(cc)->def->body.attr.id, val, ((void*)0), cc, 1);
27130}
27131
27132static inline VALUE
27133vm_call_bmethod_body(rb_execution_context_t *ec, struct rb_calling_info *calling, struct rb_call_data *cd, const VALUE *argv)
27134{
27135 rb_proc_t *proc;
27136 VALUE val;
27137 const struct rb_callcache *cc = cd->cc;
27138
27139
27140 (((proc)) = (rb_proc_t*)((struct RData *)(((vm_cc_cme(cc)->def->body.bmethod.proc))))->data);
27141 val = rb_vm_invoke_bmethod(ec, proc, calling->recv, calling->argc, argv, calling->kw_splat, calling->block_handler, vm_cc_cme(cc));
27142
27143 return val;
27144}
27145
27146static VALUE
27147vm_call_bmethod(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
27148{
27149 ((void)0);
27150
27151 VALUE *argv;
27152 int argc;
27153 const struct rb_callinfo *ci = cd->ci;
27154
27155 CALLER_SETUP_ARG(cfp, calling, ci);
27156 argc = calling->argc;
27157 argv = ((VALUE *) __builtin_alloca_with_align( rbimpl_size_mul_or_raise(sizeof(VALUE), (argc)), __extension__ _Alignof(VALUE) * 8));
27158 ruby_nonempty_memcpy((argv), (cfp->sp - argc), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc)));
27159 cfp->sp += - argc - 1;
27160
27161 return vm_call_bmethod_body(ec, calling, cd, argv);
27162}
27163
27164static VALUE
27165find_defined_class_by_owner(VALUE current_class, VALUE target_owner)
27166{
27167 VALUE klass = current_class;
27168
27169
27170 if ((__builtin_constant_p(RUBY_T_ICLASS) ? rbimpl_RB_TYPE_P_fastpath((klass), (RUBY_T_ICLASS)) : (RB_TYPE_P)((klass), (RUBY_T_ICLASS))) && RB_FL_TEST(klass, ((VALUE)RUBY_FL_USER5)) &&
27171 (__builtin_constant_p(RUBY_T_CLASS) ? rbimpl_RB_TYPE_P_fastpath((RBASIC_CLASS(klass)), (RUBY_T_CLASS)) : (RB_TYPE_P)((RBASIC_CLASS(klass)), (RUBY_T_CLASS)))) {
27172 klass = RBASIC_CLASS(klass);
27173 }
27174
27175 while (RB_TEST(klass)) {
27176 VALUE owner = (__builtin_constant_p(RUBY_T_ICLASS) ? rbimpl_RB_TYPE_P_fastpath((klass), (RUBY_T_ICLASS)) : (RB_TYPE_P)((klass), (RUBY_T_ICLASS))) ? RBASIC_CLASS(klass) : klass;
27177 if (owner == target_owner) {
27178 return klass;
27179 }
27180 klass = RCLASS_SUPER(klass);
27181 }
27182
27183 return current_class;
27184}
27185
27186static const rb_callable_method_entry_t *
27187aliased_callable_method_entry(const rb_callable_method_entry_t *me)
27188{
27189 const rb_method_entry_t *orig_me = me->def->body.alias.original_me;
27190 const rb_callable_method_entry_t *cme;
27191
27192 if (orig_me->defined_class == 0) {
27193 VALUE defined_class = find_defined_class_by_owner(me->defined_class, orig_me->owner);
27194 ((void)0);
27195 cme = rb_method_entry_complement_defined_class(orig_me, me->called_id, defined_class);
27196
27197 if (me->def->alias_count + me->def->complemented_count == 0) {
27198 __extension__({
27199;
27200; __typeof__(rb_obj_write((VALUE)(me), (VALUE *)(&me->def->body.alias.original_me), (VALUE)(cme), "./vm_insnhelper.c", 2710)) unaligned_member_access_result = (rb_obj_write((VALUE)(me), (VALUE *)(&me->def->body.alias.original_me), (VALUE)(cme), "./vm_insnhelper.c", 2710));
27201; unaligned_member_access_result; });
27202 }
27203 else {
27205 rb_method_definition_create(VM_METHOD_TYPE_ALIAS, me->def->original_id);
27206 rb_method_definition_set((rb_method_entry_t *)me, def, (void *)cme);
27207 }
27208 }
27209 else {
27210 cme = (const rb_callable_method_entry_t *)orig_me;
27211 }
27212
27213 ((void)0);
27214 return cme;
27215}
27216
27217static VALUE
27218vm_call_alias(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
27219{
27220 struct rb_call_data aliased = {
27221 .ci = cd->ci,
27222 .cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .klass = ((VALUE)RUBY_Qundef), .cme_ = aliased_callable_method_entry(vm_cc_cme(cd->cc)), .call_ = vm_call_general, .aux_ = { 0 }, },
27223
27224 };
27225
27226 return vm_call_method_each_type(ec, cfp, calling, &aliased);
27227}
27228
27229static enum method_missing_reason
27230ci_missing_reason(const struct rb_callinfo *ci)
27231{
27232 enum method_missing_reason stat = MISSING_NOENTRY;
27233 if (vm_ci_flag(ci) & (0x01 << VM_CALL_VCALL_bit)) stat |= MISSING_VCALL;
27234 if (vm_ci_flag(ci) & (0x01 << VM_CALL_FCALL_bit)) stat |= MISSING_FCALL;
27235 if (vm_ci_flag(ci) & (0x01 << VM_CALL_SUPER_bit)) stat |= MISSING_SUPER;
27236 return stat;
27237}
27238
27239static VALUE
27240vm_call_symbol(
27242 struct rb_calling_info *calling, const struct rb_callinfo *ci,
27243 VALUE symbol)
27244{
27245 __builtin_assume(calling->argc >= 0);
27246
27247
27248 enum method_missing_reason missing_reason = MISSING_NOENTRY;
27249 int argc = calling->argc;
27250 VALUE recv = calling->recv;
27251 VALUE klass = rb_class_of(recv);
27252 ID mid = rb_check_id(&symbol);
27253 int flags = (0x01 << VM_CALL_FCALL_bit) |
27254 (0x01 << VM_CALL_OPT_SEND_bit) |
27255 (calling->kw_splat ? (0x01 << VM_CALL_KW_SPLAT_bit) : 0);
27256
27257 if ((__builtin_expect(!!(! mid), 0))) {
27258 mid = idMethodMissing;
27259 missing_reason = ci_missing_reason(ci);
27260 ec->method_missing_reason = missing_reason;
27261 int i = argc;
27262 do { __extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (sizeof(*((reg_cfp)->sp)) == sizeof(VALUE)) ? 2 : -1; })]; __extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (sizeof(*((reg_cfp))) == sizeof(rb_control_frame_t)) ? 2 : -1; })]; const struct rb_control_frame_struct *bound = (void *)&((reg_cfp)->sp)[((1))]; if ((__builtin_expect(!!(((reg_cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
27263 (((reg_cfp)->sp) += (((1))));
27264 memmove((&(*(((((reg_cfp)->sp)))-(i - 1)-1))), (&(*(((((reg_cfp)->sp)))-(i)-1))), rbimpl_size_mul_or_raise(sizeof(VALUE), (i)));
27265 argc = ++calling->argc;
27266
27267 if (rb_method_basic_definition_p(klass, idMethodMissing)) {
27268
27269 (*(((((reg_cfp)->sp)))-(i)-1)) = symbol;
27270 int priv = vm_ci_flag(ci) & ((0x01 << VM_CALL_FCALL_bit) | (0x01 << VM_CALL_VCALL_bit));
27271 const VALUE *argv = (((((reg_cfp)->sp)))-(argc));
27272 VALUE exc = rb_make_no_method_exception(
27273 rb_eNoMethodError, 0, recv, argc, argv, priv);
27274
27275 rb_exc_raise(exc);
27276 }
27277 else {
27278 (*(((((reg_cfp)->sp)))-(i)-1)) = rb_str_intern(symbol);
27279 }
27280 }
27281
27282 struct rb_call_data cd = {
27283 .ci = &(struct rb_callinfo) { .flags = RUBY_T_IMEMO | (imemo_callinfo << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .mid = mid, .flag = flags, .argc = argc, .kwarg = vm_ci_kwarg(ci), },
27284 .cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .klass = klass, .cme_ = rb_callable_method_entry_with_refinements(klass, mid, ((void*)0)), .call_ = vm_call_general, .aux_ = { .method_missing_reason = missing_reason }, },
27285
27286
27287
27288 };
27289
27290 return vm_call_method(ec, reg_cfp, calling, &cd);
27291}
27292
27293static VALUE
27294vm_call_opt_send(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *orig_cd)
27295{
27296 ((void)0);
27297
27298 int i;
27299 VALUE sym;
27300
27301 CALLER_SETUP_ARG(reg_cfp, calling, orig_cd->ci);
27302
27303 i = calling->argc - 1;
27304
27305 if (calling->argc == 0) {
27306 rb_raise(rb_eArgError, "no method name given");
27307 }
27308 else {
27309 sym = (*(((((reg_cfp)->sp)))-(i)-1));
27310 if (i > 0) {
27311 memmove((&(*(((((reg_cfp)->sp)))-(i)-1))), (&(*(((((reg_cfp)->sp)))-(i-1)-1))), rbimpl_size_mul_or_raise(sizeof(VALUE), (i)));
27312 }
27313 calling->argc -= 1;
27314 (((reg_cfp)->sp) -= (((1))));
27315
27316 return vm_call_symbol(ec, reg_cfp, calling, orig_cd->ci, sym);
27317 }
27318}
27319
27320static inline VALUE vm_invoke_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci, _Bool is_lambda, VALUE block_handler);
27321
27322__declspec(noinline) static VALUE vm_invoke_block_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, const struct rb_callinfo *ci, VALUE block_handler);
27323
27324
27325
27326static VALUE
27327vm_invoke_block_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
27328 struct rb_calling_info *calling, const struct rb_callinfo *ci, VALUE block_handler)
27329{
27330 int argc = calling->argc;
27331
27332
27333 if (argc > 0) memmove((&(*(((((reg_cfp)->sp)))-(argc)-1))), (&(*(((((reg_cfp)->sp)))-(argc-1)-1))), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc)));
27334 (((reg_cfp)->sp) -= (((1))));
27335
27336 return vm_invoke_block(ec, reg_cfp, calling, ci, 0, block_handler);
27337}
27338
27339static VALUE
27340vm_call_opt_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
27341{
27342 ((void)0);
27343
27344 const struct rb_callinfo *ci = cd->ci;
27345 VALUE procval = calling->recv;
27346 return vm_invoke_block_opt_call(ec, reg_cfp, calling, ci, VM_BH_FROM_PROC(procval));
27347}
27348
27349static VALUE
27350vm_call_opt_block_call(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
27351{
27352 ((void)0);
27353 VALUE block_handler = VM_ENV_BLOCK_HANDLER(VM_CF_LEP(reg_cfp));
27354 const struct rb_callinfo *ci = cd->ci;
27355
27356 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_CALL)]&((1 << 12))) == 0), 1)))) {
27357 return vm_invoke_block_opt_call(ec, reg_cfp, calling, ci, block_handler);
27358 }
27359 else {
27360 calling->recv = rb_vm_bh_to_procval(ec, block_handler);
27361 vm_search_method((VALUE)reg_cfp->iseq, cd, calling->recv);
27362 return vm_call_general(ec, reg_cfp, calling, cd);
27363 }
27364}
27365
27366static VALUE
27367vm_call_method_missing_body(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling,
27368 const struct rb_callinfo *orig_ci, enum method_missing_reason reason)
27369{
27370 ((void)0);
27371
27372 VALUE *argv = (((((reg_cfp)->sp)))-(calling->argc));
27373 unsigned int argc;
27374
27375 CALLER_SETUP_ARG(reg_cfp, calling, orig_ci);
27376 argc = calling->argc + 1;
27377
27378 unsigned int flag = (0x01 << VM_CALL_FCALL_bit) | (0x01 << VM_CALL_OPT_SEND_bit) | (calling->kw_splat ? (0x01 << VM_CALL_KW_SPLAT_bit) : 0);
27379 calling->argc = argc;
27380
27381
27382 do { __extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (sizeof(*((reg_cfp)->sp)) == sizeof(VALUE)) ? 2 : -1; })]; __extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (sizeof(*((reg_cfp))) == sizeof(rb_control_frame_t)) ? 2 : -1; })]; const struct rb_control_frame_struct *bound = (void *)&((reg_cfp)->sp)[((1))]; if ((__builtin_expect(!!(((reg_cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
27383 ;
27384 if (argc > 1) {
27385 memmove((argv+1), (argv), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc-1)));
27386 }
27387 argv[0] = rb_id2sym(vm_ci_mid(orig_ci));
27388 (((reg_cfp)->sp) += (((1))));
27389
27390 ec->method_missing_reason = reason;
27391 struct rb_call_data cd = {
27392 .ci = &(struct rb_callinfo) { .flags = RUBY_T_IMEMO | (imemo_callinfo << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .mid = idMethodMissing, .flag = flag, .argc = argc, .kwarg = vm_ci_kwarg(orig_ci), },
27393 .cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .klass = ((VALUE)RUBY_Qundef), .cme_ = rb_callable_method_entry_without_refinements(rb_class_of(calling->recv), idMethodMissing, ((void*)0)), .call_ = vm_call_general, .aux_ = { 0 }, },
27394
27395 };
27396
27397 return vm_call_method(ec, reg_cfp, calling, &cd);
27398}
27399
27400static VALUE
27401vm_call_method_missing(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
27402 struct rb_calling_info *calling, struct rb_call_data *cd)
27403{
27404 return vm_call_method_missing_body(ec, reg_cfp, calling, cd->ci, vm_cc_cmethod_missing_reason(cd->cc));
27405}
27406
27407static const rb_callable_method_entry_t *refined_method_callable_without_refinement(const rb_callable_method_entry_t *me);
27408static VALUE
27409vm_call_zsuper(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd, VALUE klass)
27410{
27411 klass = RCLASS_SUPER(klass);
27412
27413 const rb_callable_method_entry_t *cme = klass ? rb_callable_method_entry(klass, vm_ci_mid(cd->ci)) : ((void*)0);
27414 if (cme == ((void*)0)) {
27415 return vm_call_method_nome(ec, cfp, calling, cd);
27416 }
27417 if (cme->def->type == VM_METHOD_TYPE_REFINED &&
27418 cme->def->body.refined.orig_me) {
27419 cme = refined_method_callable_without_refinement(cme);
27420 }
27421
27422 struct rb_call_data zsuper = {
27423 .ci = cd->ci,
27424 .cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .klass = ((VALUE)RUBY_Qundef), .cme_ = cme, .call_ = vm_call_general, .aux_ = { 0 }, },
27425 };
27426
27427 return vm_call_method_each_type(ec, cfp, calling, &zsuper);
27428}
27429
27430static inline VALUE
27431find_refinement(VALUE refinements, VALUE klass)
27432{
27433 if (RB_NIL_P(refinements)) {
27434 return ((VALUE)RUBY_Qnil);
27435 }
27436 return rb_hash_lookup(refinements, klass);
27437}
27438
27439__attribute__((__pure__)) static rb_control_frame_t * current_method_entry(const rb_execution_context_t *ec, rb_control_frame_t *cfp);
27440static rb_control_frame_t *
27441current_method_entry(const rb_execution_context_t *ec, rb_control_frame_t *cfp)
27442{
27443 rb_control_frame_t *top_cfp = cfp;
27444
27445 if (cfp->iseq && cfp->iseq->body->type == ISEQ_TYPE_BLOCK) {
27446 const rb_iseq_t *local_iseq = cfp->iseq->body->local_iseq;
27447
27448 do {
27449 cfp = ((cfp)+1);
27450 if (RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, cfp)) {
27451
27452 return top_cfp;
27453 }
27454 } while (cfp->iseq != local_iseq);
27455 }
27456 return cfp;
27457}
27458
27459static const rb_callable_method_entry_t *
27460refined_method_callable_without_refinement(const rb_callable_method_entry_t *me)
27461{
27462 const rb_method_entry_t *orig_me = me->def->body.refined.orig_me;
27463 const rb_callable_method_entry_t *cme;
27464
27465 if (orig_me->defined_class == 0) {
27466 cme = ((void*)0);
27468 }
27469 else {
27470 cme = (const rb_callable_method_entry_t *)orig_me;
27471 }
27472
27473 ((void)0);
27474
27475 if ((!(cme) || !(cme)->def || (cme)->def->type == VM_METHOD_TYPE_UNDEF)) {
27476 cme = ((void*)0);
27477 }
27478
27479 return cme;
27480}
27481
27482static const rb_callable_method_entry_t *
27483search_refined_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_call_data *cd)
27484{
27485 ID mid = vm_ci_mid(cd->ci);
27486 const rb_cref_t *cref = vm_get_cref(cfp->ep);
27487 const struct rb_callcache * const cc = cd->cc;
27488 const rb_callable_method_entry_t *cme = vm_cc_cme(cc);
27489
27490 for (; cref; cref = CREF_NEXT(cref)) {
27491 const VALUE refinement = find_refinement(CREF_REFINEMENTS(cref), vm_cc_cme(cc)->owner);
27492 if (RB_NIL_P(refinement)) continue;
27493
27494 const rb_callable_method_entry_t *const ref_me =
27495 rb_callable_method_entry(refinement, mid);
27496
27497 if (ref_me) {
27498 if (vm_cc_call(cc) == vm_call_super_method) {
27499 const rb_control_frame_t *top_cfp = current_method_entry(ec, cfp);
27500 if (refinement == find_refinement(CREF_REFINEMENTS(vm_get_cref(top_cfp->ep)), vm_cc_cme(cc)->owner)) {
27501 continue;
27502 }
27503 const rb_callable_method_entry_t *top_me = rb_vm_frame_method_entry(top_cfp);
27504 if (top_me && rb_method_definition_eq(ref_me->def, top_me->def)) {
27505 continue;
27506 }
27507 }
27508
27509 if (cme->def->type != VM_METHOD_TYPE_REFINED ||
27510 cme->def != ref_me->def) {
27511 cme = ref_me;
27512 }
27513 if (ref_me->def->type != VM_METHOD_TYPE_REFINED) {
27514 return cme;
27515 }
27516 }
27517 else {
27518 return ((void*)0);
27519 }
27520 }
27521
27522 if (vm_cc_cme(cc)->def->body.refined.orig_me) {
27523 return refined_method_callable_without_refinement(vm_cc_cme(cc));
27524 }
27525 else {
27526 VALUE klass = RCLASS_SUPER(vm_cc_cme(cc)->defined_class);
27527 const rb_callable_method_entry_t *cme = klass ? rb_callable_method_entry(klass, mid) : ((void*)0);
27528 return cme;
27529 }
27530}
27531
27532static VALUE
27533vm_call_refined(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
27534{
27535 struct rb_call_data refined = {
27536 .ci = cd->ci,
27537 .cc = &(struct rb_callcache) { .flags = RUBY_T_IMEMO | (imemo_callcache << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .klass = ((VALUE)RUBY_Qundef), .cme_ = search_refined_method(ec, cfp, cd), .call_ = vm_call_general, .aux_ = { 0 }, },
27538
27539 };
27540
27541 if (vm_cc_cme(refined.cc)) {
27542 return vm_call_method(ec, cfp, calling, &refined);
27543 }
27544 else {
27545 return vm_call_method_nome(ec, cfp, calling, cd);
27546 }
27547}
27548COLDFUNC static VALUE
27549vm_call_method_each_type(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd) {
27550 const struct rb_callinfo *ci = cd->ci;
27551 const struct rb_callcache *cc = cd->cc;
27552
27553 switch (vm_cc_cme(cc)->def->type) {
27554 case VM_METHOD_TYPE_ISEQ:
27555 CC_SET_FASTPATH(cc, vm_call_iseq_setup, 1);
27556 return vm_call_iseq_setup(ec, cfp, calling, cd);
27557
27558 case VM_METHOD_TYPE_NOTIMPLEMENTED:
27559 case VM_METHOD_TYPE_CFUNC:
27560 CC_SET_FASTPATH(cc, vm_call_cfunc, 1);
27561 return vm_call_cfunc(ec, cfp, calling, cd);
27562
27563 case VM_METHOD_TYPE_ATTRSET:
27564 CALLER_SETUP_ARG(cfp, calling, ci);
27565 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
27566
27567 rb_check_arity(calling->argc, 1, 1);
27568 vm_cc_attr_index_set(cc, 0);
27569 CC_SET_FASTPATH(cc, vm_call_attrset, !(vm_ci_flag(ci) & ((0x01 << VM_CALL_ARGS_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_bit) | (0x01 << VM_CALL_KWARG_bit))));
27570 return vm_call_attrset(ec, cfp, calling, cd);
27571
27572 case VM_METHOD_TYPE_IVAR:
27573 CALLER_SETUP_ARG(cfp, calling, ci);
27574 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
27575 rb_check_arity(calling->argc, 0, 0);
27576 vm_cc_attr_index_set(cc, 0);
27577 CC_SET_FASTPATH(cc, vm_call_ivar, !(vm_ci_flag(ci) & ((0x01 << VM_CALL_ARGS_SPLAT_bit) | (0x01 << VM_CALL_KW_SPLAT_bit))));
27578 return vm_call_ivar(ec, cfp, calling, cd);
27579
27580 case VM_METHOD_TYPE_MISSING:
27581 vm_cc_method_missing_reason_set(cc, 0);
27582 CC_SET_FASTPATH(cc, vm_call_method_missing, 1);
27583 return vm_call_method_missing(ec, cfp, calling, cd);
27584
27585 case VM_METHOD_TYPE_BMETHOD:
27586 CC_SET_FASTPATH(cc, vm_call_bmethod, 1);
27587 return vm_call_bmethod(ec, cfp, calling, cd);
27588
27589 case VM_METHOD_TYPE_ALIAS:
27590 CC_SET_FASTPATH(cc, vm_call_alias, 1);
27591 return vm_call_alias(ec, cfp, calling, cd);
27592
27593 case VM_METHOD_TYPE_OPTIMIZED:
27594 switch (vm_cc_cme(cc)->def->body.optimize_type) {
27595 case OPTIMIZED_METHOD_TYPE_SEND:
27596 CC_SET_FASTPATH(cc, vm_call_opt_send, 1);
27597 return vm_call_opt_send(ec, cfp, calling, cd);
27598 case OPTIMIZED_METHOD_TYPE_CALL:
27599 CC_SET_FASTPATH(cc, vm_call_opt_call, 1);
27600 return vm_call_opt_call(ec, cfp, calling, cd);
27601 case OPTIMIZED_METHOD_TYPE_BLOCK_CALL:
27602 CC_SET_FASTPATH(cc, vm_call_opt_block_call, 1);
27603 return vm_call_opt_block_call(ec, cfp, calling, cd);
27604 default:
27605 rb_bug("vm_call_method: unsupported optimized method type (%d)",
27606 vm_cc_cme(cc)->def->body.optimize_type);
27607 }
27608
27609 case VM_METHOD_TYPE_UNDEF:
27610 break;
27611
27612 case VM_METHOD_TYPE_ZSUPER:
27613 return vm_call_zsuper(ec, cfp, calling, cd, ((((struct RClass *)(vm_cc_cme(cc)->defined_class))->ptr)->origin_));
27614
27615 case VM_METHOD_TYPE_REFINED:
27616
27617
27618 return vm_call_refined(ec, cfp, calling, cd);
27619 }
27620
27621 rb_bug("vm_call_method: unsupported method type (%d)", vm_cc_cme(cc)->def->type);
27622}
27623
27624__declspec(noreturn) static void vm_raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE obj, int call_status);
27625
27626static VALUE
27627vm_call_method_nome(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
27628{
27629
27630 const struct rb_callinfo *ci = cd->ci;
27631 const int stat = ci_missing_reason(ci);
27632
27633 if (vm_ci_mid(ci) == idMethodMissing) {
27634 rb_control_frame_t *reg_cfp = cfp;
27635 VALUE *argv = (((((reg_cfp)->sp)))-(calling->argc));
27636 vm_raise_method_missing(ec, calling->argc, argv, calling->recv, stat);
27637 }
27638 else {
27639 return vm_call_method_missing_body(ec, cfp, calling, cd->ci, stat);
27640 }
27641}
27642
27643static inline VALUE
27644vm_call_method(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
27645{
27646 const struct rb_callinfo *ci = cd->ci;
27647 const struct rb_callcache *cc = cd->cc;
27648
27649 ((void)0);
27650
27651 if (vm_cc_cme(cc) != ((void*)0)) {
27652 switch ((rb_method_visibility_t)(((vm_cc_cme(cc))->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0))) {
27653 case METHOD_VISI_PUBLIC:
27654 return vm_call_method_each_type(ec, cfp, calling, cd);
27655
27656 case METHOD_VISI_PRIVATE:
27657 if (!(vm_ci_flag(ci) & (0x01 << VM_CALL_FCALL_bit))) {
27658 enum method_missing_reason stat = MISSING_PRIVATE;
27659 if (vm_ci_flag(ci) & (0x01 << VM_CALL_VCALL_bit)) stat |= MISSING_VCALL;
27660
27661 vm_cc_method_missing_reason_set(cc, stat);
27662 CC_SET_FASTPATH(cc, vm_call_method_missing, 1);
27663 return vm_call_method_missing(ec, cfp, calling, cd);
27664 }
27665 return vm_call_method_each_type(ec, cfp, calling, cd);
27666
27667 case METHOD_VISI_PROTECTED:
27668 if (!(vm_ci_flag(ci) & (0x01 << VM_CALL_OPT_SEND_bit))) {
27669 if (!rb_obj_is_kind_of(cfp->self, vm_cc_cme(cc)->defined_class)) {
27670 vm_cc_method_missing_reason_set(cc, MISSING_PROTECTED);
27671 return vm_call_method_missing(ec, cfp, calling, cd);
27672 }
27673 else {
27674
27675 ((void)0);
27676 struct rb_callcache cc_on_stack = *cc;
27677 RB_FL_SET_RAW((VALUE)&cc_on_stack, ((VALUE)RUBY_FL_USER4));
27678 struct rb_call_data dummy = {
27679 .ci = ci,
27680 .cc = &cc_on_stack,
27681 };
27682
27683 return vm_call_method_each_type(ec, cfp, calling, &dummy);
27684 }
27685 }
27686 return vm_call_method_each_type(ec, cfp, calling, cd);
27687
27688 default:
27689 rb_bug("unreachable");
27690 }
27691 }
27692 else {
27693 return vm_call_method_nome(ec, cfp, calling, cd);
27694 }
27695}
27696
27697static VALUE
27698vm_call_general(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
27699{
27700 ((void)0);
27701 return vm_call_method(ec, reg_cfp, calling, cd);
27702}
27703
27704static VALUE
27705vm_call_super_method(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
27706{
27707 ((void)0);
27708
27709
27710 const struct rb_callcache *cc = cd->cc;
27711 if (vm_cc_call(cc) != vm_call_super_method) rb_bug("bug");
27712 return vm_call_method(ec, reg_cfp, calling, cd);
27713}
27714
27715
27716
27717static inline VALUE
27718vm_search_normal_superclass(VALUE klass)
27719{
27720 if (RB_BUILTIN_TYPE(klass) == RUBY_T_ICLASS &&
27721 RB_FL_TEST(((struct RBasic *)(klass))->klass, RMODULE_IS_REFINEMENT)) {
27722 klass = ((struct RBasic *)(klass))->klass;
27723 }
27724 klass = ((((struct RClass *)(klass))->ptr)->origin_);
27725 return RCLASS_SUPER(klass);
27726}
27727
27728__declspec(noreturn) static void vm_super_outside(void);
27729
27730static void
27731vm_super_outside(void)
27732{
27733 rb_raise(rb_eNoMethodError, "super called outside of method");
27734}
27735
27736static void
27737vm_search_super_method(const rb_control_frame_t *reg_cfp, struct rb_call_data *cd, VALUE recv)
27738{
27739 VALUE current_defined_class, klass;
27740 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(reg_cfp);
27741
27742 if (!me) {
27743 vm_super_outside();
27744 }
27745
27746 current_defined_class = me->defined_class;
27747
27748 if (!RB_NIL_P(((((struct RClass *)(current_defined_class))->ptr)->refined_class))) {
27749 current_defined_class = ((((struct RClass *)(current_defined_class))->ptr)->refined_class);
27750 }
27751
27752 if (RB_BUILTIN_TYPE(current_defined_class) != RUBY_T_MODULE &&
27753 !RB_FL_TEST(current_defined_class, RMODULE_INCLUDED_INTO_REFINEMENT) &&
27754 !rb_obj_is_kind_of(recv, current_defined_class)) {
27755 VALUE m = (__builtin_constant_p(RUBY_T_ICLASS) ? rbimpl_RB_TYPE_P_fastpath((current_defined_class), (RUBY_T_ICLASS)) : (RB_TYPE_P)((current_defined_class), (RUBY_T_ICLASS))) ?
27756 ((((struct RClass *)(current_defined_class))->ptr)->includer) : current_defined_class;
27757
27758 if (m) {
27759 rb_raise(rb_eTypeError,
27760 "self has wrong type to call super in this context: "
27761 "%""l""i" "\v"" (expected %""l""i" "\v"")",
27762 rb_obj_class(recv), m);
27763 }
27764 }
27765
27766 if (me->def->type == VM_METHOD_TYPE_BMETHOD && (vm_ci_flag(cd->ci) & (0x01 << VM_CALL_ZSUPER_bit))) {
27767 rb_raise(rb_eRuntimeError,
27768 "implicit argument passing of super from method defined"
27769 " by define_method() is not supported."
27770 " Specify all arguments explicitly.");
27771 }
27772
27773
27774 cd->ci = vm_ci_new_runtime_(me->def->original_id, vm_ci_flag(cd->ci), vm_ci_argc(cd->ci), vm_ci_kwarg(cd->ci), "./vm_insnhelper.c", 3316);
27775
27776
27777
27778 (rb_obj_written((VALUE)(reg_cfp->iseq), (VALUE)(((VALUE)RUBY_Qundef)), (VALUE)(cd->ci), "./vm_insnhelper.c", 3317));
27779
27780 klass = vm_search_normal_superclass(me->defined_class);
27781
27782 if (!klass) {
27783
27784 const struct rb_callcache *cc = vm_cc_new(klass, ((void*)0), vm_call_method_missing);
27785 __extension__({
27786;
27787; __typeof__(rb_obj_write((VALUE)(reg_cfp->iseq), (VALUE *)(&cd->cc), (VALUE)(cc), "./vm_insnhelper.c", 3324)) unaligned_member_access_result = (rb_obj_write((VALUE)(reg_cfp->iseq), (VALUE *)(&cd->cc), (VALUE)(cc), "./vm_insnhelper.c", 3324));
27788; unaligned_member_access_result; });
27789 }
27790 else {
27791 vm_search_method_fastpath((VALUE)reg_cfp->iseq, cd, klass);
27792 const rb_callable_method_entry_t *cached_cme = vm_cc_cme(cd->cc);
27793
27794 ID mid = vm_ci_mid(cd->ci);
27795
27796
27797 if (cached_cme == ((void*)0)) {
27798
27799 static const struct rb_callcache *empty_cc_for_super = ((void*)0);
27800 if (empty_cc_for_super == ((void*)0)) {
27801 empty_cc_for_super = vm_cc_new(0, ((void*)0), vm_call_super_method);
27802 RB_FL_SET_RAW((VALUE)empty_cc_for_super, ((VALUE)RUBY_FL_USER4));
27803 rb_gc_register_mark_object((VALUE)empty_cc_for_super);
27804 }
27805 __extension__({
27806;
27807; __typeof__(rb_obj_write((VALUE)(reg_cfp->iseq), (VALUE *)(&cd->cc), (VALUE)(empty_cc_for_super), "./vm_insnhelper.c", 3341)) unaligned_member_access_result = (rb_obj_write((VALUE)(reg_cfp->iseq), (VALUE *)(&cd->cc), (VALUE)(empty_cc_for_super), "./vm_insnhelper.c", 3341));
27808; unaligned_member_access_result; });
27809 }
27810 else if (cached_cme->called_id != mid) {
27811 const rb_callable_method_entry_t *cme = rb_callable_method_entry(klass, mid);
27812 const struct rb_callcache *cc = vm_cc_new(klass, cme, vm_call_super_method);
27813 __extension__({
27814;
27815; __typeof__(rb_obj_write((VALUE)(reg_cfp->iseq), (VALUE *)(&cd->cc), (VALUE)(cc), "./vm_insnhelper.c", 3346)) unaligned_member_access_result = (rb_obj_write((VALUE)(reg_cfp->iseq), (VALUE *)(&cd->cc), (VALUE)(cc), "./vm_insnhelper.c", 3346));
27816; unaligned_member_access_result; });
27817 }
27818 else {
27819 switch (cached_cme->def->type) {
27820
27821 case VM_METHOD_TYPE_REFINED:
27822
27823 case VM_METHOD_TYPE_ATTRSET:
27824 case VM_METHOD_TYPE_IVAR:
27825 vm_cc_call_set(cd->cc, vm_call_super_method);
27826 break;
27827 default:
27828 break;
27829 }
27830 }
27831 }
27832}
27833
27834
27835
27836static inline int
27837block_proc_is_lambda(const VALUE procval)
27838{
27839 rb_proc_t *proc;
27840
27841 if (procval) {
27842 (((proc)) = (rb_proc_t*)((struct RData *)(((procval))))->data);
27843 return proc->is_lambda;
27844 }
27845 else {
27846 return 0;
27847 }
27848}
27849
27850static VALUE
27851vm_yield_with_cfunc(rb_execution_context_t *ec,
27852 const struct rb_captured_block *captured,
27853 VALUE self, int argc, const VALUE *argv, int kw_splat, VALUE block_handler,
27855{
27856 int is_lambda = 0;
27857 VALUE val, arg, blockarg;
27858 int frame_flag;
27859 const struct vm_ifunc *ifunc = captured->code.ifunc;
27860
27861 if (is_lambda) {
27862 arg = rb_ary_new_from_values(argc, argv);
27863 }
27864 else if (argc == 0) {
27865 arg = ((VALUE)RUBY_Qnil);
27866 }
27867 else {
27868 arg = argv[0];
27869 }
27870
27871 blockarg = rb_vm_bh_to_procval(ec, block_handler);
27872
27873 frame_flag = VM_FRAME_MAGIC_IFUNC | VM_FRAME_FLAG_CFRAME | (me ? VM_FRAME_FLAG_BMETHOD : 0);
27874 if (kw_splat) {
27875 frame_flag |= VM_FRAME_FLAG_CFRAME_KW;
27876 }
27877
27878 vm_push_frame(ec, (const rb_iseq_t *)captured->code.ifunc,
27879 frame_flag,
27880 self,
27881 ((VALUE)((captured->ep)) | (0x01)),
27882 (VALUE)me,
27883 0, ec->cfp->sp, 0, 0);
27884 val = (*ifunc->func)(arg, (VALUE)ifunc->data, argc, argv, blockarg);
27885 rb_vm_pop_frame(ec);
27886
27887 return val;
27888}
27889
27890static VALUE
27891vm_yield_with_symbol(rb_execution_context_t *ec, VALUE symbol, int argc, const VALUE *argv, int kw_splat, VALUE block_handler)
27892{
27893 return rb_sym_proc_call(rb_sym2id(symbol), argc, argv, kw_splat, rb_vm_bh_to_procval(ec, block_handler));
27894}
27895
27896static inline int
27897vm_callee_setup_block_arg_arg0_splat(rb_control_frame_t *cfp, const rb_iseq_t *iseq, VALUE *argv, VALUE ary)
27898{
27899 int i;
27900 long len = rb_array_len(ary);
27901
27902 do { __extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (sizeof(*((cfp)->sp)) == sizeof(VALUE)) ? 2 : -1; })]; __extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (sizeof(*((cfp))) == sizeof(rb_control_frame_t)) ? 2 : -1; })]; const struct rb_control_frame_struct *bound = (void *)&((cfp)->sp)[((iseq->body->param.lead_num))]; if ((__builtin_expect(!!(((cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
27903
27904 for (i=0; i<len && i<iseq->body->param.lead_num; i++) {
27905 argv[i] = RARRAY_AREF(ary, i);
27906 }
27907
27908 return i;
27909}
27910
27911static inline VALUE
27912vm_callee_setup_block_arg_arg0_check(VALUE *argv)
27913{
27914 VALUE ary, arg0 = argv[0];
27915 ary = rb_check_array_type(arg0);
27916
27917
27918
27919 ((void)0);
27920
27921 return ary;
27922}
27923
27924static int
27925vm_callee_setup_block_arg(rb_execution_context_t *ec, struct rb_calling_info *calling, const struct rb_callinfo *ci, const rb_iseq_t *iseq, VALUE *argv, const enum arg_setup_type arg_setup_type)
27926{
27927 if (rb_simple_iseq_p(iseq)) {
27928 rb_control_frame_t *cfp = ec->cfp;
27929 VALUE arg0;
27930
27931 CALLER_SETUP_ARG(cfp, calling, ci);
27932 CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci);
27933
27934 if (arg_setup_type == arg_setup_block &&
27935 calling->argc == 1 &&
27936 iseq->body->param.flags.has_lead &&
27937 !iseq->body->param.flags.ambiguous_param0 &&
27938 !RB_NIL_P(arg0 = vm_callee_setup_block_arg_arg0_check(argv))) {
27939 calling->argc = vm_callee_setup_block_arg_arg0_splat(cfp, iseq, argv, arg0);
27940 }
27941
27942 if (calling->argc != iseq->body->param.lead_num) {
27943 if (arg_setup_type == arg_setup_block) {
27944 if (calling->argc < iseq->body->param.lead_num) {
27945 int i;
27946 do { __extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (sizeof(*((cfp)->sp)) == sizeof(VALUE)) ? 2 : -1; })]; __extension__ extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (sizeof(*((cfp))) == sizeof(rb_control_frame_t)) ? 2 : -1; })]; const struct rb_control_frame_struct *bound = (void *)&((cfp)->sp)[((iseq->body->param.lead_num))]; if ((__builtin_expect(!!(((cfp)) <= &bound[1]), 0))) { vm_stackoverflow(); } } while (0);
27947 for (i=calling->argc; i<iseq->body->param.lead_num; i++) argv[i] = ((VALUE)RUBY_Qnil);
27948 calling->argc = iseq->body->param.lead_num;
27949 }
27950 else if (calling->argc > iseq->body->param.lead_num) {
27951 calling->argc = iseq->body->param.lead_num;
27952 }
27953 }
27954 else {
27955 argument_arity_error(ec, iseq, calling->argc, iseq->body->param.lead_num, iseq->body->param.lead_num);
27956 }
27957 }
27958
27959 return 0;
27960 }
27961 else {
27962 return setup_parameters_complex(ec, iseq, calling, ci, argv, arg_setup_type);
27963 }
27964}
27965
27966static int
27967vm_yield_setup_args(rb_execution_context_t *ec, const rb_iseq_t *iseq, const int argc, VALUE *argv, int kw_splat, VALUE block_handler, enum arg_setup_type arg_setup_type)
27968{
27969 struct rb_calling_info calling_entry, *calling;
27970
27971 calling = &calling_entry;
27972 calling->argc = argc;
27973 calling->block_handler = block_handler;
27974 calling->kw_splat = kw_splat;
27975 calling->recv = ((VALUE)RUBY_Qundef);
27976 struct rb_callinfo dummy_ci = (struct rb_callinfo) { .flags = RUBY_T_IMEMO | (imemo_callinfo << ((VALUE)RUBY_FL_USHIFT)) | ((VALUE)RUBY_FL_USER4), .mid = 0, .flag = (kw_splat ? (0x01 << VM_CALL_KW_SPLAT_bit) : 0), .argc = 0, .kwarg = 0, };
27977
27978 return vm_callee_setup_block_arg(ec, calling, &dummy_ci, iseq, argv, arg_setup_type);
27979}
27980
27981
27982
27983static VALUE
27984vm_invoke_iseq_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
27985 struct rb_calling_info *calling, const struct rb_callinfo *ci,
27986 _Bool is_lambda, VALUE block_handler)
27987{
27988 const struct rb_captured_block *captured = VM_BH_TO_ISEQ_BLOCK(block_handler);
27989 const rb_iseq_t *iseq = rb_iseq_check(captured->code.iseq);
27990 const int arg_size = iseq->body->param.size;
27991 VALUE * const rsp = ((((reg_cfp)->sp))) - calling->argc;
27992 int opt_pc = vm_callee_setup_block_arg(ec, calling, ci, iseq, rsp, is_lambda ? arg_setup_method : arg_setup_block);
27993
27994 (((reg_cfp)->sp) = (((rsp))));
27995
27996 vm_push_frame(ec, iseq,
27997 VM_FRAME_MAGIC_BLOCK | (is_lambda ? VM_FRAME_FLAG_LAMBDA : 0),
27998 captured->self,
27999 ((VALUE)((captured->ep)) | (0x01)), 0,
28000 iseq->body->iseq_encoded + opt_pc,
28001 rsp + arg_size,
28002 iseq->body->local_table_size - arg_size, iseq->body->stack_max);
28003
28004 return ((VALUE)RUBY_Qundef);
28005}
28006
28007static VALUE
28008vm_invoke_symbol_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
28009 struct rb_calling_info *calling, const struct rb_callinfo *ci,
28010 __attribute__ ((__unused__)) _Bool is_lambda, VALUE block_handler)
28011{
28012 if (calling->argc < 1) {
28013 rb_raise(rb_eArgError, "no receiver given");
28014 }
28015 else {
28016 VALUE symbol = VM_BH_TO_SYMBOL(block_handler);
28017 CALLER_SETUP_ARG(reg_cfp, calling, ci);
28018 calling->recv = (*(((((reg_cfp)->sp)))-(--calling->argc)-1));
28019 return vm_call_symbol(ec, reg_cfp, calling, ci, symbol);
28020 }
28021}
28022
28023static VALUE
28024vm_invoke_ifunc_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
28025 struct rb_calling_info *calling, const struct rb_callinfo *ci,
28026 __attribute__ ((__unused__)) _Bool is_lambda, VALUE block_handler)
28027{
28028 VALUE val;
28029 int argc;
28030 const struct rb_captured_block *captured = VM_BH_TO_IFUNC_BLOCK(block_handler);
28031 CALLER_SETUP_ARG(ec->cfp, calling, ci);
28032 CALLER_REMOVE_EMPTY_KW_SPLAT(ec->cfp, calling, ci);
28033 argc = calling->argc;
28034 val = vm_yield_with_cfunc(ec, captured, captured->self, argc, (((((reg_cfp)->sp)))-(argc)), calling->kw_splat, calling->block_handler, ((void*)0));
28035 ((((reg_cfp)->sp) -= (((argc)))));
28036 return val;
28037}
28038
28039static VALUE
28040vm_proc_to_block_handler(VALUE procval)
28041{
28042 const struct rb_block *block = vm_proc_block(procval);
28043
28044 switch (vm_block_type(block)) {
28045 case block_type_iseq:
28046 return VM_BH_FROM_ISEQ_BLOCK(&block->as.captured);
28047 case block_type_ifunc:
28048 return VM_BH_FROM_IFUNC_BLOCK(&block->as.captured);
28049 case block_type_symbol:
28050 return VM_BH_FROM_SYMBOL(block->as.symbol);
28051 case block_type_proc:
28052 return VM_BH_FROM_PROC(block->as.proc);
28053 }
28054 __builtin_unreachable();
28055 return ((VALUE)RUBY_Qundef);
28056}
28057
28058static VALUE
28059vm_invoke_proc_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
28060 struct rb_calling_info *calling, const struct rb_callinfo *ci,
28061 _Bool is_lambda, VALUE block_handler)
28062{
28063 while (vm_block_handler_type(block_handler) == block_handler_type_proc) {
28064 VALUE proc = VM_BH_TO_PROC(block_handler);
28065 is_lambda = block_proc_is_lambda(proc);
28066 block_handler = vm_proc_to_block_handler(proc);
28067 }
28068
28069 return vm_invoke_block(ec, reg_cfp, calling, ci, is_lambda, block_handler);
28070}
28071
28072static inline VALUE
28073vm_invoke_block(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
28074 struct rb_calling_info *calling, const struct rb_callinfo *ci,
28075 _Bool is_lambda, VALUE block_handler)
28076{
28077 VALUE (*func)(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp,
28078 struct rb_calling_info *calling, const struct rb_callinfo *ci,
28079 _Bool is_lambda, VALUE block_handler);
28080
28081 switch (vm_block_handler_type(block_handler)) {
28082 case block_handler_type_iseq: func = vm_invoke_iseq_block; break;
28083 case block_handler_type_ifunc: func = vm_invoke_ifunc_block; break;
28084 case block_handler_type_proc: func = vm_invoke_proc_block; break;
28085 case block_handler_type_symbol: func = vm_invoke_symbol_block; break;
28086 default: rb_bug("vm_invoke_block: unreachable");
28087 }
28088
28089 return func(ec, reg_cfp, calling, ci, is_lambda, block_handler);
28090}
28091
28092static VALUE
28093vm_make_proc_with_iseq(const rb_iseq_t *blockiseq)
28094{
28095 const rb_execution_context_t *ec = rb_current_execution_context();
28096 const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
28097 struct rb_captured_block *captured;
28098
28099 if (cfp == 0) {
28100 rb_bug("vm_make_proc_with_iseq: unreachable");
28101 }
28102
28103 captured = VM_CFP_TO_CAPTURED_BLOCK(cfp);
28104 captured->code.iseq = blockiseq;
28105
28106 return rb_vm_make_proc(ec, captured, rb_cProc);
28107}
28108
28109static VALUE
28110vm_once_exec(VALUE iseq)
28111{
28112 VALUE proc = vm_make_proc_with_iseq((rb_iseq_t *)iseq);
28113 return rb_proc_call_with_block(proc, 0, 0, ((VALUE)RUBY_Qnil));
28114}
28115
28116static VALUE
28117vm_once_clear(VALUE data)
28118{
28119 union iseq_inline_storage_entry *is = (union iseq_inline_storage_entry *)data;
28120 is->once.running_thread = ((void*)0);
28121 return ((VALUE)RUBY_Qnil);
28122}
28123
28124
28125
28126static enum defined_type
28127check_respond_to_missing(VALUE obj, VALUE v)
28128{
28129 VALUE args[2];
28130 VALUE r;
28131
28132 args[0] = obj; args[1] = ((VALUE)RUBY_Qfalse);
28133 r = rb_check_funcall(v, idRespond_to_missing, 2, args);
28134 if (r != ((VALUE)RUBY_Qundef) && RB_TEST(r)) {
28135 return DEFINED_METHOD;
28136 }
28137 else {
28138 return DEFINED_NOT_DEFINED;
28139 }
28140}
28141
28142static VALUE
28143vm_defined(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, rb_num_t op_type, VALUE obj, VALUE needstr, VALUE v)
28144{
28145 VALUE klass;
28146 enum defined_type expr_type = DEFINED_NOT_DEFINED;
28147 enum defined_type type = (enum defined_type)op_type;
28148
28149 switch (type) {
28150 case DEFINED_IVAR:
28151 if (rb_ivar_defined((((((reg_cfp)))->self)), rb_sym2id(obj))) {
28152 expr_type = DEFINED_IVAR;
28153 }
28154 break;
28155 case DEFINED_IVAR2:
28156 klass = vm_get_cbase(((((reg_cfp)->ep))));
28157 break;
28158 case DEFINED_GVAR:
28159 if (rb_gvar_defined(rb_sym2id(obj))) {
28160 expr_type = DEFINED_GVAR;
28161 }
28162 break;
28163 case DEFINED_CVAR: {
28164 const rb_cref_t *cref = vm_get_cref(((((reg_cfp)->ep))));
28165 klass = vm_get_cvar_base(cref, (((reg_cfp))), 0);
28166 if (rb_cvar_defined(klass, rb_sym2id(obj))) {
28167 expr_type = DEFINED_CVAR;
28168 }
28169 break;
28170 }
28171 case DEFINED_CONST:
28172 case DEFINED_CONST_FROM: {
28173 _Bool allow_nil = type == DEFINED_CONST;
28174 klass = v;
28175 if (vm_get_ev_const(ec, klass, rb_sym2id(obj), allow_nil, 1)) {
28176 expr_type = DEFINED_CONST;
28177 }
28178 break;
28179 }
28180 case DEFINED_FUNC:
28181 klass = rb_class_of(v);
28182 if (rb_ec_obj_respond_to(ec, v, rb_sym2id(obj), 1)) {
28183 expr_type = DEFINED_METHOD;
28184 }
28185 break;
28186 case DEFINED_METHOD:{
28187 VALUE klass = rb_class_of(v);
28188 const rb_method_entry_t *me = rb_method_entry_with_refinements(klass, rb_sym2id(obj), ((void*)0));
28189
28190 if (me) {
28191 switch ((rb_method_visibility_t)(((me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0))) {
28192 case METHOD_VISI_PRIVATE:
28193 break;
28194 case METHOD_VISI_PROTECTED:
28195 if (!rb_obj_is_kind_of((((((reg_cfp)))->self)), rb_class_real(me->defined_class))) {
28196 break;
28197 }
28198 case METHOD_VISI_PUBLIC:
28199 expr_type = DEFINED_METHOD;
28200 break;
28201 default:
28202 rb_bug("vm_defined: unreachable: %u", (unsigned int)(rb_method_visibility_t)(((me)->flags & (((VALUE)RUBY_FL_USER4) | ((VALUE)RUBY_FL_USER5))) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+0)));
28203 }
28204 }
28205 else {
28206 expr_type = check_respond_to_missing(obj, v);
28207 }
28208 break;
28209 }
28210 case DEFINED_YIELD:
28211 if (((VM_EP_LEP(((((reg_cfp)->ep)))))[(-1)]) != 0) {
28212 expr_type = DEFINED_YIELD;
28213 }
28214 break;
28215 case DEFINED_ZSUPER:
28216 {
28217 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry((((reg_cfp))));
28218
28219 if (me) {
28220 VALUE klass = vm_search_normal_superclass(me->defined_class);
28221 ID id = me->def->original_id;
28222
28223 if (rb_method_boundp(klass, id, 0)) {
28224 expr_type = DEFINED_ZSUPER;
28225 }
28226 }
28227 }
28228 break;
28229 case DEFINED_REF:{
28230 if (vm_getspecial(ec, (VM_EP_LEP(((((reg_cfp)->ep))))), ((VALUE)RUBY_Qfalse), RB_FIX2INT(obj)) != ((VALUE)RUBY_Qnil)) {
28231 expr_type = DEFINED_GVAR;
28232 }
28233 break;
28234 }
28235 default:
28236 rb_bug("unimplemented defined? type (VM)");
28237 break;
28238 }
28239
28240 if (expr_type != 0) {
28241 if (needstr != ((VALUE)RUBY_Qfalse)) {
28242 return rb_iseq_defined_string(expr_type);
28243 }
28244 else {
28245 return ((VALUE)RUBY_Qtrue);
28246 }
28247 }
28248 else {
28249 return ((VALUE)RUBY_Qnil);
28250 }
28251}
28252
28253static const VALUE *
28254vm_get_ep(const VALUE *const reg_ep, rb_num_t lv)
28255{
28256 rb_num_t i;
28257 const VALUE *ep = reg_ep;
28258 for (i = 0; i < lv; i++) {
28259 ep = ((VALUE *)((ep)[(-1)] & ~0x03));
28260 }
28261 return ep;
28262}
28263
28264static VALUE
28265vm_get_special_object(const VALUE *const reg_ep,
28266 enum vm_special_object_type type)
28267{
28268 switch (type) {
28269 case VM_SPECIAL_OBJECT_VMCORE:
28270 return rb_mRubyVMFrozenCore;
28271 case VM_SPECIAL_OBJECT_CBASE:
28272 return vm_get_cbase(reg_ep);
28273 case VM_SPECIAL_OBJECT_CONST_BASE:
28274 return vm_get_const_base(reg_ep);
28275 default:
28276 rb_bug("putspecialobject insn: unknown value_type %d", type);
28277 }
28278}
28279
28280static void
28281vm_freezestring(VALUE str, VALUE debug)
28282{
28283 if (!RB_NIL_P(debug)) {
28284 rb_ivar_set(str, id_debug_created_info, debug);
28285 }
28286 rb_str_freeze(str);
28287}
28288
28289static VALUE
28290vm_concat_array(VALUE ary1, VALUE ary2st)
28291{
28292 const VALUE ary2 = ary2st;
28293 VALUE tmp1 = rb_check_to_array(ary1);
28294 VALUE tmp2 = rb_check_to_array(ary2);
28295
28296 if (RB_NIL_P(tmp1)) {
28297 tmp1 = rb_ary_new_from_args(1, ary1);
28298 }
28299
28300 if (RB_NIL_P(tmp2)) {
28301 tmp2 = rb_ary_new_from_args(1, ary2);
28302 }
28303
28304 if (tmp1 == ary1) {
28305 tmp1 = rb_ary_dup(ary1);
28306 }
28307 return rb_ary_concat(tmp1, tmp2);
28308}
28309
28310static VALUE
28311vm_splat_array(VALUE flag, VALUE ary)
28312{
28313 VALUE tmp = rb_check_to_array(ary);
28314 if (RB_NIL_P(tmp)) {
28315 return rb_ary_new_from_args(1, ary);
28316 }
28317 else if (RB_TEST(flag)) {
28318 return rb_ary_dup(tmp);
28319 }
28320 else {
28321 return tmp;
28322 }
28323}
28324
28325static VALUE
28326vm_check_match(rb_execution_context_t *ec, VALUE target, VALUE pattern, rb_num_t flag)
28327{
28328 enum vm_check_match_type type = ((int)flag) & 0x03;
28329
28330 if (flag & 0x04) {
28331 long i;
28332 const long n = rb_array_len(pattern);
28333
28334 for (i = 0; i < n; i++) {
28335 VALUE v = RARRAY_AREF(pattern, i);
28336 VALUE c = check_match(ec, v, target, type);
28337
28338 if (RB_TEST(c)) {
28339 return c;
28340 }
28341 }
28342 return ((VALUE)RUBY_Qfalse);
28343 }
28344 else {
28345 return check_match(ec, pattern, target, type);
28346 }
28347}
28348
28349static VALUE
28350vm_check_keyword(lindex_t bits, lindex_t idx, const VALUE *ep)
28351{
28352 const VALUE kw_bits = *(ep - bits);
28353
28354 if (RB_FIXNUM_P(kw_bits)) {
28355 unsigned int b = (unsigned int)rb_fix2ulong(kw_bits);
28356 if ((idx < (32-1)) && (b & (0x01 << idx)))
28357 return ((VALUE)RUBY_Qfalse);
28358 }
28359 else {
28360 ((void)0);
28361 if (rb_hash_has_key(kw_bits, __builtin_choose_expr( __builtin_constant_p(idx), ((VALUE)(idx)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(idx)))) return ((VALUE)RUBY_Qfalse);
28362 }
28363 return ((VALUE)RUBY_Qtrue);
28364}
28365
28366static void
28367vm_dtrace(rb_event_flag_t flag, rb_execution_context_t *ec)
28368{
28369 if (0 ||
28370 0 ||
28371 0 ||
28372 0) {
28373
28374 switch (flag) {
28375 case 0x0008:
28376 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
28377 return;
28378 case 0x0020:
28379 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
28380 return;
28381 case 0x0010:
28382 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
28383 return;
28384 case 0x0040:
28385 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, 0, 0, &args)) { do {} while (0); } } } while (0);
28386 return;
28387 }
28388 }
28389}
28390
28391static VALUE
28392vm_const_get_under(ID id, rb_num_t flags, VALUE cbase)
28393{
28394 VALUE ns;
28395
28396 if ((ns = vm_search_const_defined_class(cbase, id)) == 0) {
28397 return ns;
28398 }
28399 else if (((flags) & 0x08)) {
28400 return rb_public_const_get_at(ns, id);
28401 }
28402 else {
28403 return rb_const_get_at(ns, id);
28404 }
28405}
28406
28407static VALUE
28408vm_check_if_class(ID id, rb_num_t flags, VALUE super, VALUE klass)
28409{
28410 if (!(__builtin_constant_p(RUBY_T_CLASS) ? rbimpl_RB_TYPE_P_fastpath((klass), (RUBY_T_CLASS)) : (RB_TYPE_P)((klass), (RUBY_T_CLASS)))) {
28411 return 0;
28412 }
28413 else if (((flags) & 0x10)) {
28414 VALUE tmp = rb_class_real(RCLASS_SUPER(klass));
28415
28416 if (tmp != super) {
28417 rb_raise(rb_eTypeError,
28418 "superclass mismatch for class %""l""i" "\v""",
28419 rb_id2str(id));
28420 }
28421 else {
28422 return klass;
28423 }
28424 }
28425 else {
28426 return klass;
28427 }
28428}
28429
28430static VALUE
28431vm_check_if_module(ID id, VALUE mod)
28432{
28433 if (!(__builtin_constant_p(RUBY_T_MODULE) ? rbimpl_RB_TYPE_P_fastpath((mod), (RUBY_T_MODULE)) : (RB_TYPE_P)((mod), (RUBY_T_MODULE)))) {
28434 return 0;
28435 }
28436 else {
28437 return mod;
28438 }
28439}
28440
28441static VALUE
28442declare_under(ID id, VALUE cbase, VALUE c)
28443{
28444 rb_set_class_path_string(c, cbase, rb_id2str(id));
28445 rb_const_set(cbase, id, c);
28446 return c;
28447}
28448
28449static VALUE
28450vm_declare_class(ID id, rb_num_t flags, VALUE cbase, VALUE super)
28451{
28452
28453 VALUE s = ((flags) & 0x10) ? super : rb_cObject;
28454 VALUE c = declare_under(id, cbase, rb_define_class_id(id, s));
28455 rb_class_inherited(s, c);
28456 return c;
28457}
28458
28459static VALUE
28460vm_declare_module(ID id, VALUE cbase)
28461{
28462
28463 return declare_under(id, cbase, rb_define_module_id(id));
28464}
28465
28466__declspec(noreturn) static void unmatched_redefinition(const char *type, VALUE cbase, ID id, VALUE old);
28467static void
28468unmatched_redefinition(const char *type, VALUE cbase, ID id, VALUE old)
28469{
28470 VALUE name = rb_id2str(id);
28471 VALUE message = rb_sprintf("%""l""i" "\v"" is not a %s",
28472 name, type);
28473 VALUE location = rb_const_source_location_at(cbase, id);
28474 if (!RB_NIL_P(location)) {
28475 rb_str_catf(message, "\n%""l""i" "\v"":%""l""i" "\v"":"
28476 " previous definition of %""l""i" "\v"" was here",
28477 rb_ary_entry(location, 0), rb_ary_entry(location, 1), name);
28478 }
28479 rb_exc_raise(rb_exc_new_str(rb_eTypeError, message));
28480}
28481
28482static VALUE
28483vm_define_class(ID id, rb_num_t flags, VALUE cbase, VALUE super)
28484{
28485 VALUE klass;
28486
28487 if (((flags) & 0x10) && !(__builtin_constant_p(RUBY_T_CLASS) ? rbimpl_RB_TYPE_P_fastpath((super), (RUBY_T_CLASS)) : (RB_TYPE_P)((super), (RUBY_T_CLASS)))) {
28488 rb_raise(rb_eTypeError,
28489 "superclass must be a Class (%""l""i" "\v"" given)",
28490 rb_obj_class(super));
28491 }
28492
28493 vm_check_if_namespace(cbase);
28494
28495
28496 rb_autoload_load(cbase, id);
28497 if ((klass = vm_const_get_under(id, flags, cbase)) != 0) {
28498 if (!vm_check_if_class(id, flags, super, klass))
28499 unmatched_redefinition("class", cbase, id, klass);
28500 return klass;
28501 }
28502 else {
28503 return vm_declare_class(id, flags, cbase, super);
28504 }
28505}
28506
28507static VALUE
28508vm_define_module(ID id, rb_num_t flags, VALUE cbase)
28509{
28510 VALUE mod;
28511
28512 vm_check_if_namespace(cbase);
28513 if ((mod = vm_const_get_under(id, flags, cbase)) != 0) {
28514 if (!vm_check_if_module(id, mod))
28515 unmatched_redefinition("module", cbase, id, mod);
28516 return mod;
28517 }
28518 else {
28519 return vm_declare_module(id, cbase);
28520 }
28521}
28522
28523static VALUE
28524vm_find_or_create_class_by_id(ID id,
28525 rb_num_t flags,
28526 VALUE cbase,
28527 VALUE super)
28528{
28529 rb_vm_defineclass_type_t type = ((rb_vm_defineclass_type_t)(flags) & VM_DEFINECLASS_TYPE_MASK);
28530
28531 switch (type) {
28532 case VM_DEFINECLASS_TYPE_CLASS:
28533
28534 return vm_define_class(id, flags, cbase, super);
28535
28536 case VM_DEFINECLASS_TYPE_SINGLETON_CLASS:
28537
28538 return rb_singleton_class(cbase);
28539
28540 case VM_DEFINECLASS_TYPE_MODULE:
28541
28542 return vm_define_module(id, flags, cbase);
28543
28544 default:
28545 rb_bug("unknown defineclass type: %d", (int)type);
28546 }
28547}
28548
28549static rb_method_visibility_t
28550vm_scope_visibility_get(const rb_execution_context_t *ec)
28551{
28552 const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
28553
28554 if (!vm_env_cref_by_cref(cfp->ep)) {
28555 return METHOD_VISI_PUBLIC;
28556 }
28557 else {
28558 return CREF_SCOPE_VISI(vm_ec_cref(ec))->method_visi;
28559 }
28560}
28561
28562static int
28563vm_scope_module_func_check(const rb_execution_context_t *ec)
28564{
28565 const rb_control_frame_t *cfp = rb_vm_get_ruby_level_next_cfp(ec, ec->cfp);
28566
28567 if (!vm_env_cref_by_cref(cfp->ep)) {
28568 return 0;
28569 }
28570 else {
28571 return CREF_SCOPE_VISI(vm_ec_cref(ec))->module_func;
28572 }
28573}
28574
28575static void
28576vm_define_method(const rb_execution_context_t *ec, VALUE obj, ID id, VALUE iseqval, int is_singleton)
28577{
28578 VALUE klass;
28579 rb_method_visibility_t visi;
28580 rb_cref_t *cref = vm_ec_cref(ec);
28581
28582 if (!is_singleton) {
28583 klass = CREF_CLASS(cref);
28584 visi = vm_scope_visibility_get(ec);
28585 }
28586 else {
28587 klass = rb_singleton_class(obj);
28588 visi = METHOD_VISI_PUBLIC;
28589 }
28590
28591 if (RB_NIL_P(klass)) {
28592 rb_raise(rb_eTypeError, "no class/module to add method");
28593 }
28594
28595 rb_add_method_iseq(klass, id, (const rb_iseq_t *)iseqval, cref, visi);
28596
28597 if (!is_singleton && vm_scope_module_func_check(ec)) {
28598 klass = rb_singleton_class(klass);
28599 rb_add_method_iseq(klass, id, (const rb_iseq_t *)iseqval, cref, METHOD_VISI_PUBLIC);
28600 }
28601}
28602
28603static void
28604vm_search_method_wrap(
28605 const struct rb_control_frame_struct *reg_cfp,
28606 struct rb_call_data *cd,
28607 VALUE recv)
28608{
28609 vm_search_method((VALUE)reg_cfp->iseq, cd, recv);
28610}
28611
28612static void
28613vm_search_invokeblock(
28614 const struct rb_control_frame_struct *reg_cfp,
28615 struct rb_call_data *cd,
28616 VALUE recv)
28617{
28618
28619}
28620
28621static VALUE
28622vm_invokeblock_i(
28623 struct rb_execution_context_struct *ec,
28624 struct rb_control_frame_struct *reg_cfp,
28625 struct rb_calling_info *calling,
28626 struct rb_call_data *cd)
28627{
28628 const struct rb_callinfo *ci = cd->ci;
28629 VALUE block_handler = VM_CF_BLOCK_HANDLER((((reg_cfp))));
28630
28631 if (block_handler == 0) {
28632 rb_vm_localjump_error("no block given (yield)", ((VALUE)RUBY_Qnil), 0);
28633 }
28634 else {
28635 return vm_invoke_block(ec, (((reg_cfp))), calling, ci, 0, block_handler);
28636 }
28637}
28638
28639static VALUE
28640vm_sendish(
28641 struct rb_execution_context_struct *ec,
28642 struct rb_control_frame_struct *reg_cfp,
28643 struct rb_call_data *cd,
28644 VALUE block_handler,
28645 void (*method_explorer)(
28646 const struct rb_control_frame_struct *reg_cfp,
28647 struct rb_call_data *cd,
28648 VALUE recv))
28649{
28650 VALUE val;
28651 const struct rb_callinfo *ci = cd->ci;
28652 int argc = vm_ci_argc(ci);
28653 VALUE recv = (*(((((reg_cfp)->sp)))-(argc)-1));
28654 struct rb_calling_info calling;
28655
28656 calling.block_handler = block_handler;
28657 calling.kw_splat = (vm_ci_flag(ci) & (0x01 << VM_CALL_KW_SPLAT_bit)) > 0;
28658 calling.recv = recv;
28659 calling.argc = argc;
28660
28661 method_explorer((((reg_cfp))), cd, recv);
28662 const struct rb_callcache *cc = cd->cc;
28663
28664 val = vm_cc_call(cc)(ec, (((reg_cfp))), &calling, cd);
28665
28666 if (val != ((VALUE)RUBY_Qundef)) {
28667 return val;
28668 }
28669 else {
28670 do { (reg_cfp) = ec->cfp; } while (0);
28671 }
28672 if (((((reg_cfp)))->iseq)->body->catch_except_p) {
28673 VM_ENV_FLAGS_SET(((((reg_cfp)->ep))), VM_FRAME_FLAG_FINISH);
28674 return rb_vm_exec(ec, 1);
28675 }
28676 else if ((val = mjit_exec(ec)) == ((VALUE)RUBY_Qundef)) {
28677 VM_ENV_FLAGS_SET(((((reg_cfp)->ep))), VM_FRAME_FLAG_FINISH);
28678 return rb_vm_exec(ec, 0);
28679 }
28680 else {
28681 return val;
28682 }
28683
28684
28685
28686
28687
28688
28689}
28690
28691static VALUE
28692vm_opt_str_freeze(VALUE str, int bop, ID id)
28693{
28694 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 2))) == 0), 1)))) {
28695 return str;
28696 }
28697 else {
28698 return ((VALUE)RUBY_Qundef);
28699 }
28700}
28701
28702
28703
28704static VALUE
28705vm_opt_newarray_max(rb_num_t num, const VALUE *ptr)
28706{
28707 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MAX)]&((1 << 3))) == 0), 1)))) {
28708 if (num == 0) {
28709 return ((VALUE)RUBY_Qnil);
28710 }
28711 else {
28712 struct cmp_opt_data cmp_opt = { 0, 0 };
28713 VALUE result = *ptr;
28714 rb_snum_t i = num - 1;
28715 while (i-- > 0) {
28716 const VALUE v = *++ptr;
28717 if (((RB_FIXNUM_P(v) && RB_FIXNUM_P(result) && (((cmp_opt).opt_inited & (1U << cmp_opt_Integer)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Integer)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Integer)), rb_method_basic_definition_p(rb_cInteger, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Integer))))) ? (((long)v > (long)result) ? 1 : ((long)v < (long)result) ? -1 : 0) : (((__builtin_constant_p(RUBY_T_STRING) ? rbimpl_RB_TYPE_P_fastpath(((v)), (RUBY_T_STRING)) : (RB_TYPE_P)(((v)), (RUBY_T_STRING))) && rb_class_of(v) == rb_cString) && ((__builtin_constant_p(RUBY_T_STRING) ? rbimpl_RB_TYPE_P_fastpath(((result)), (RUBY_T_STRING)) : (RB_TYPE_P)(((result)), (RUBY_T_STRING))) && rb_class_of(result) == rb_cString) && (((cmp_opt).opt_inited & (1U << cmp_opt_String)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_String)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_String)), rb_method_basic_definition_p(rb_cString, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_String))))) ? rb_str_cmp(v, result) : (RB_FLOAT_TYPE_P(v) && RB_FLOAT_TYPE_P(result) && (((cmp_opt).opt_inited & (1U << cmp_opt_Float)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Float)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Float)), rb_method_basic_definition_p(rb_cFloat, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Float))))) ? rb_float_cmp(v, result) : rb_cmpint(rb_funcallv(v, idCmp, 1, &result), v, result)) > 0) {
28718 result = v;
28719 }
28720 }
28721 return result;
28722 }
28723 }
28724 else {
28725 VALUE ary = rb_ary_new_from_values(num, ptr);
28726 return rb_funcall(ary, idMax, 0);
28727 }
28728}
28729
28730static VALUE
28731vm_opt_newarray_min(rb_num_t num, const VALUE *ptr)
28732{
28733 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MIN)]&((1 << 3))) == 0), 1)))) {
28734 if (num == 0) {
28735 return ((VALUE)RUBY_Qnil);
28736 }
28737 else {
28738 struct cmp_opt_data cmp_opt = { 0, 0 };
28739 VALUE result = *ptr;
28740 rb_snum_t i = num - 1;
28741 while (i-- > 0) {
28742 const VALUE v = *++ptr;
28743 if (((RB_FIXNUM_P(v) && RB_FIXNUM_P(result) && (((cmp_opt).opt_inited & (1U << cmp_opt_Integer)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Integer)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Integer)), rb_method_basic_definition_p(rb_cInteger, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Integer))))) ? (((long)v > (long)result) ? 1 : ((long)v < (long)result) ? -1 : 0) : (((__builtin_constant_p(RUBY_T_STRING) ? rbimpl_RB_TYPE_P_fastpath(((v)), (RUBY_T_STRING)) : (RB_TYPE_P)(((v)), (RUBY_T_STRING))) && rb_class_of(v) == rb_cString) && ((__builtin_constant_p(RUBY_T_STRING) ? rbimpl_RB_TYPE_P_fastpath(((result)), (RUBY_T_STRING)) : (RB_TYPE_P)(((result)), (RUBY_T_STRING))) && rb_class_of(result) == rb_cString) && (((cmp_opt).opt_inited & (1U << cmp_opt_String)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_String)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_String)), rb_method_basic_definition_p(rb_cString, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_String))))) ? rb_str_cmp(v, result) : (RB_FLOAT_TYPE_P(v) && RB_FLOAT_TYPE_P(result) && (((cmp_opt).opt_inited & (1U << cmp_opt_Float)) ? ((cmp_opt).opt_methods & (1U << cmp_opt_Float)) : (((cmp_opt).opt_inited |= (1U << cmp_opt_Float)), rb_method_basic_definition_p(rb_cFloat, idCmp) && ((cmp_opt).opt_methods |= (1U << cmp_opt_Float))))) ? rb_float_cmp(v, result) : rb_cmpint(rb_funcallv(v, idCmp, 1, &result), v, result)) < 0) {
28744 result = v;
28745 }
28746 }
28747 return result;
28748 }
28749 }
28750 else {
28751 VALUE ary = rb_ary_new_from_values(num, ptr);
28752 return rb_funcall(ary, idMin, 0);
28753 }
28754}
28755
28756
28757static int
28758vm_ic_hit_p(IC ic, const VALUE *reg_ep)
28759{
28760 if (ic->ic_serial == (ruby_vm_global_constant_state)) {
28761 return (ic->ic_cref == ((void*)0) ||
28762 ic->ic_cref == vm_get_cref(reg_ep));
28763 }
28764 return 0;
28765}
28766COLDFUNC static void
28767vm_ic_update(IC ic, VALUE val, const VALUE *reg_ep) {
28768 ((void)0);
28769 ic->value = val;
28770 ic->ic_serial = (ruby_vm_global_constant_state) - ruby_vm_const_missing_count;
28771 ic->ic_cref = vm_get_const_key_cref(reg_ep);
28772 ruby_vm_const_missing_count = 0;
28773}
28774
28775static VALUE
28776vm_once_dispatch(rb_execution_context_t *ec, ISEQ iseq, ISE is)
28777{
28778 rb_thread_t *th = rb_ec_thread_ptr(ec);
28779 rb_thread_t *const RUNNING_THREAD_ONCE_DONE = (rb_thread_t *)(0x1);
28780
28781 again:
28782 if (is->once.running_thread == RUNNING_THREAD_ONCE_DONE) {
28783 return is->once.value;
28784 }
28785 else if (is->once.running_thread == ((void*)0)) {
28786 VALUE val;
28787 is->once.running_thread = th;
28788 val = rb_ensure(vm_once_exec, (VALUE)iseq, vm_once_clear, (VALUE)is);
28789 __extension__({
28790;
28791; __typeof__(rb_obj_write((VALUE)(ec->cfp->iseq), (VALUE *)(&is->once.value), (VALUE)(val), "./vm_insnhelper.c", 4331)) unaligned_member_access_result = (rb_obj_write((VALUE)(ec->cfp->iseq), (VALUE *)(&is->once.value), (VALUE)(val), "./vm_insnhelper.c", 4331));
28792; unaligned_member_access_result; });
28793
28794 is->once.running_thread = RUNNING_THREAD_ONCE_DONE;
28795 return val;
28796 }
28797 else if (is->once.running_thread == th) {
28798
28799 return vm_once_exec((VALUE)iseq);
28800 }
28801 else {
28802
28803 rb_vm_check_ints(ec);
28805 goto again;
28806 }
28807}
28808
28809static OFFSET
28810vm_case_dispatch(CDHASH hash, OFFSET else_offset, VALUE key)
28811{
28812 switch (__extension__({ VALUE arg_obj = (key); RB_SPECIAL_CONST_P(arg_obj) ? -1 : (int)RB_BUILTIN_TYPE(arg_obj); })) {
28813 case -1:
28814 case RUBY_T_FLOAT:
28815 case RUBY_T_SYMBOL:
28816 case RUBY_T_BIGNUM:
28817 case RUBY_T_STRING:
28818 if (((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_EQQ)]&((1 << 6) | (1 << 0) | (1 << 1) | (1 << 9) | (1 << 10) | (1 << 11) | (1 << 2))) == 0), 1)))) {
28819
28820
28821
28822
28823
28824
28825
28826 st_data_t val;
28827 if (RB_FLOAT_TYPE_P(key)) {
28828 double kval = rb_float_value_inline(key);
28829 if (!__builtin_isinf_sign (kval) && modf(kval, &kval) == 0.0) {
28830 key = (((kval) < (9223372036854775807L / 2) + 1) && ((kval) >= ((-9223372036854775807L -1L) / 2))) ? RB_INT2FIX((long)kval) : rb_dbl2big(kval);
28831 }
28832 }
28833 if (rb_hash_stlike_lookup(hash, key, &val)) {
28834 return rb_fix2long((VALUE)val);
28835 }
28836 else {
28837 return else_offset;
28838 }
28839 }
28840 }
28841 return 0;
28842}
28843
28844__declspec(noreturn) static void vm_stack_consistency_error(const rb_execution_context_t *ec, const rb_control_frame_t *, const VALUE *);
28845
28846
28847
28848static void
28849vm_stack_consistency_error(const rb_execution_context_t *ec,
28850 const rb_control_frame_t *cfp,
28851 const VALUE *bp)
28852{
28853 const ptrdiff_t nsp = ((cfp->sp) - (ec)->vm_stack);
28854 const ptrdiff_t nbp = ((bp) - (ec)->vm_stack);
28855 static const char stack_consistency_error[] =
28856 "Stack consistency error (sp: %""t""d"", bp: %""t""d"")";
28857
28858 VALUE mesg = rb_sprintf(stack_consistency_error, nsp, nbp);
28859 ((__builtin_constant_p("\n") ? rbimpl_str_cat_cstr : rb_str_cat_cstr) ((mesg), ("\n")));
28860 rb_str_append(mesg, rb_iseq_disasm(cfp->iseq));
28861 rb_exc_fatal(rb_exc_new_str(rb_eFatal, mesg));
28862
28863
28864
28865}
28866ALWAYS_INLINE(static inline VALUE
28867vm_opt_plus(VALUE recv, VALUE obj));
28868static inline VALUE
28869vm_opt_plus(VALUE recv, VALUE obj) {
28870 if (FIXNUM_2_P(recv, obj) &&
28871 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 0))) == 0), 1)))) {
28872 return rb_fix_plus_fix(recv, obj);
28873 }
28874 else if (FLONUM_2_P(recv, obj) &&
28875 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 1))) == 0), 1)))) {
28876 return rb_float_new_inline(rb_float_value_inline(recv) + rb_float_value_inline(obj));
28877 }
28878 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
28879 return ((VALUE)RUBY_Qundef);
28880 }
28881 else if (RBASIC_CLASS(recv) == rb_cFloat &&
28882 RBASIC_CLASS(obj) == rb_cFloat &&
28883 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 1))) == 0), 1)))) {
28884 return rb_float_new_inline(rb_float_value_inline(recv) + rb_float_value_inline(obj));
28885 }
28886 else if (RBASIC_CLASS(recv) == rb_cString &&
28887 RBASIC_CLASS(obj) == rb_cString &&
28888 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 2))) == 0), 1)))) {
28889 return rb_str_opt_plus(recv, obj);
28890 }
28891 else if (RBASIC_CLASS(recv) == rb_cArray &&
28892 RBASIC_CLASS(obj) == rb_cArray &&
28893 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_PLUS)]&((1 << 3))) == 0), 1)))) {
28894 return rb_ary_plus(recv, obj);
28895 }
28896 else {
28897 return ((VALUE)RUBY_Qundef);
28898 }
28899}
28900ALWAYS_INLINE(static inline VALUE
28901vm_opt_minus(VALUE recv, VALUE obj));
28902static inline VALUE
28903vm_opt_minus(VALUE recv, VALUE obj) {
28904 if (FIXNUM_2_P(recv, obj) &&
28905 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 0))) == 0), 1)))) {
28906 return rb_fix_minus_fix(recv, obj);
28907 }
28908 else if (FLONUM_2_P(recv, obj) &&
28909 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 1))) == 0), 1)))) {
28910 return rb_float_new_inline(rb_float_value_inline(recv) - rb_float_value_inline(obj));
28911 }
28912 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
28913 return ((VALUE)RUBY_Qundef);
28914 }
28915 else if (RBASIC_CLASS(recv) == rb_cFloat &&
28916 RBASIC_CLASS(obj) == rb_cFloat &&
28917 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MINUS)]&((1 << 1))) == 0), 1)))) {
28918 return rb_float_new_inline(rb_float_value_inline(recv) - rb_float_value_inline(obj));
28919 }
28920 else {
28921 return ((VALUE)RUBY_Qundef);
28922 }
28923}
28924ALWAYS_INLINE(static inline VALUE
28925vm_opt_mult(VALUE recv, VALUE obj));
28926static inline VALUE
28927vm_opt_mult(VALUE recv, VALUE obj) {
28928 if (FIXNUM_2_P(recv, obj) &&
28929 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 0))) == 0), 1)))) {
28930 return rb_fix_mul_fix(recv, obj);
28931 }
28932 else if (FLONUM_2_P(recv, obj) &&
28933 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 1))) == 0), 1)))) {
28934 return rb_float_new_inline(rb_float_value_inline(recv) * rb_float_value_inline(obj));
28935 }
28936 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
28937 return ((VALUE)RUBY_Qundef);
28938 }
28939 else if (RBASIC_CLASS(recv) == rb_cFloat &&
28940 RBASIC_CLASS(obj) == rb_cFloat &&
28941 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MULT)]&((1 << 1))) == 0), 1)))) {
28942 return rb_float_new_inline(rb_float_value_inline(recv) * rb_float_value_inline(obj));
28943 }
28944 else {
28945 return ((VALUE)RUBY_Qundef);
28946 }
28947}
28948ALWAYS_INLINE(static inline VALUE
28949vm_opt_div(VALUE recv, VALUE obj));
28950static inline VALUE
28951vm_opt_div(VALUE recv, VALUE obj) {
28952 if (FIXNUM_2_P(recv, obj) &&
28953 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 0))) == 0), 1)))) {
28954 return (rb_fix2long(obj) == 0) ? ((VALUE)RUBY_Qundef) : rb_fix_div_fix(recv, obj);
28955 }
28956 else if (FLONUM_2_P(recv, obj) &&
28957 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 1))) == 0), 1)))) {
28958 return rb_flo_div_flo(recv, obj);
28959 }
28960 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
28961 return ((VALUE)RUBY_Qundef);
28962 }
28963 else if (RBASIC_CLASS(recv) == rb_cFloat &&
28964 RBASIC_CLASS(obj) == rb_cFloat &&
28965 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_DIV)]&((1 << 1))) == 0), 1)))) {
28966 return rb_flo_div_flo(recv, obj);
28967 }
28968 else {
28969 return ((VALUE)RUBY_Qundef);
28970 }
28971}
28972ALWAYS_INLINE(static inline VALUE
28973vm_opt_mod(VALUE recv, VALUE obj));
28974static inline VALUE
28975vm_opt_mod(VALUE recv, VALUE obj) {
28976 if (FIXNUM_2_P(recv, obj) &&
28977 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 0))) == 0), 1)))) {
28978 return (rb_fix2long(obj) == 0) ? ((VALUE)RUBY_Qundef) : rb_fix_mod_fix(recv, obj);
28979 }
28980 else if (FLONUM_2_P(recv, obj) &&
28981 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 1))) == 0), 1)))) {
28982 return rb_float_new_inline(ruby_float_mod(rb_float_value_inline(recv), rb_float_value_inline(obj)));
28983 }
28984 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
28985 return ((VALUE)RUBY_Qundef);
28986 }
28987 else if (RBASIC_CLASS(recv) == rb_cFloat &&
28988 RBASIC_CLASS(obj) == rb_cFloat &&
28989 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MOD)]&((1 << 1))) == 0), 1)))) {
28990 return rb_float_new_inline(ruby_float_mod(rb_float_value_inline(recv), rb_float_value_inline(obj)));
28991 }
28992 else {
28993 return ((VALUE)RUBY_Qundef);
28994 }
28995}
28996ALWAYS_INLINE(static inline VALUE
28997vm_opt_neq(const rb_iseq_t *iseq, CALL_DATA cd, CALL_DATA cd_eq, VALUE recv, VALUE obj));
28998static inline VALUE
28999vm_opt_neq(const rb_iseq_t *iseq, CALL_DATA cd, CALL_DATA cd_eq, VALUE recv, VALUE obj) {
29000 if (vm_method_cfunc_is(iseq, cd, recv, rb_obj_not_equal)) {
29001 VALUE val = opt_equality(iseq, recv, obj, cd_eq);
29002
29003 if (val != ((VALUE)RUBY_Qundef)) {
29004 return RB_TEST(val) ? ((VALUE)RUBY_Qfalse) : ((VALUE)RUBY_Qtrue);
29005 }
29006 }
29007
29008 return ((VALUE)RUBY_Qundef);
29009}
29010ALWAYS_INLINE(static inline VALUE
29011vm_opt_lt(VALUE recv, VALUE obj));
29012static inline VALUE
29013vm_opt_lt(VALUE recv, VALUE obj) {
29014 if (FIXNUM_2_P(recv, obj) &&
29015 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 0))) == 0), 1)))) {
29016 return (long)recv < (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
29017 }
29018 else if (FLONUM_2_P(recv, obj) &&
29019 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 1))) == 0), 1)))) {
29020 return rb_float_value_inline(recv) < rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
29021 }
29022 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
29023 return ((VALUE)RUBY_Qundef);
29024 }
29025 else if (RBASIC_CLASS(recv) == rb_cFloat &&
29026 RBASIC_CLASS(obj) == rb_cFloat &&
29027 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LT)]&((1 << 1))) == 0), 1)))) {
29028 ;
29029 return rb_float_value_inline(recv) < rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
29030 }
29031 else {
29032 return ((VALUE)RUBY_Qundef);
29033 }
29034}
29035ALWAYS_INLINE(static inline VALUE
29036vm_opt_le(VALUE recv, VALUE obj));
29037static inline VALUE
29038vm_opt_le(VALUE recv, VALUE obj) {
29039 if (FIXNUM_2_P(recv, obj) &&
29040 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 0))) == 0), 1)))) {
29041 return (long)recv <= (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
29042 }
29043 else if (FLONUM_2_P(recv, obj) &&
29044 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 1))) == 0), 1)))) {
29045 return rb_float_value_inline(recv) <= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
29046 }
29047 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
29048 return ((VALUE)RUBY_Qundef);
29049 }
29050 else if (RBASIC_CLASS(recv) == rb_cFloat &&
29051 RBASIC_CLASS(obj) == rb_cFloat &&
29052 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LE)]&((1 << 1))) == 0), 1)))) {
29053 ;
29054 return rb_float_value_inline(recv) <= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
29055 }
29056 else {
29057 return ((VALUE)RUBY_Qundef);
29058 }
29059}
29060ALWAYS_INLINE(static inline VALUE
29061vm_opt_gt(VALUE recv, VALUE obj));
29062static inline VALUE
29063vm_opt_gt(VALUE recv, VALUE obj) {
29064 if (FIXNUM_2_P(recv, obj) &&
29065 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 0))) == 0), 1)))) {
29066 return (long)recv > (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
29067 }
29068 else if (FLONUM_2_P(recv, obj) &&
29069 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 1))) == 0), 1)))) {
29070 return rb_float_value_inline(recv) > rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
29071 }
29072 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
29073 return ((VALUE)RUBY_Qundef);
29074 }
29075 else if (RBASIC_CLASS(recv) == rb_cFloat &&
29076 RBASIC_CLASS(obj) == rb_cFloat &&
29077 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GT)]&((1 << 1))) == 0), 1)))) {
29078 ;
29079 return rb_float_value_inline(recv) > rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
29080 }
29081 else {
29082 return ((VALUE)RUBY_Qundef);
29083 }
29084}
29085ALWAYS_INLINE(static inline VALUE
29086vm_opt_ge(VALUE recv, VALUE obj));
29087static inline VALUE
29088vm_opt_ge(VALUE recv, VALUE obj) {
29089 if (FIXNUM_2_P(recv, obj) &&
29090 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 0))) == 0), 1)))) {
29091 return (long)recv >= (long)obj ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
29092 }
29093 else if (FLONUM_2_P(recv, obj) &&
29094 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 1))) == 0), 1)))) {
29095 return rb_float_value_inline(recv) >= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
29096 }
29097 else if (RB_SPECIAL_CONST_P(recv) || RB_SPECIAL_CONST_P(obj)) {
29098 return ((VALUE)RUBY_Qundef);
29099 }
29100 else if (RBASIC_CLASS(recv) == rb_cFloat &&
29101 RBASIC_CLASS(obj) == rb_cFloat &&
29102 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_GE)]&((1 << 1))) == 0), 1)))) {
29103 ;
29104 return rb_float_value_inline(recv) >= rb_float_value_inline(obj) ? ((VALUE)RUBY_Qtrue) : ((VALUE)RUBY_Qfalse);
29105 }
29106 else {
29107 return ((VALUE)RUBY_Qundef);
29108 }
29109}
29110ALWAYS_INLINE(static inline VALUE
29111vm_opt_ltlt(VALUE recv, VALUE obj));
29112static inline VALUE
29113vm_opt_ltlt(VALUE recv, VALUE obj) {
29114 if (RB_SPECIAL_CONST_P(recv)) {
29115 return ((VALUE)RUBY_Qundef);
29116 }
29117 else if (RBASIC_CLASS(recv) == rb_cString &&
29118 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LTLT)]&((1 << 2))) == 0), 1)))) {
29119 return rb_str_concat(recv, obj);
29120 }
29121 else if (RBASIC_CLASS(recv) == rb_cArray &&
29122 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_LTLT)]&((1 << 3))) == 0), 1)))) {
29123 return rb_ary_push(recv, obj);
29124 }
29125 else {
29126 return ((VALUE)RUBY_Qundef);
29127 }
29128}
29129ALWAYS_INLINE(static inline VALUE
29130vm_opt_and(VALUE recv, VALUE obj));
29131static inline VALUE
29132vm_opt_and(VALUE recv, VALUE obj) {
29133 if (FIXNUM_2_P(recv, obj) &&
29134 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AND)]&((1 << 0))) == 0), 1)))) {
29135 return (recv & obj) | 1;
29136 }
29137 else {
29138 return ((VALUE)RUBY_Qundef);
29139 }
29140}
29141ALWAYS_INLINE(static inline VALUE
29142vm_opt_or(VALUE recv, VALUE obj));
29143static inline VALUE
29144vm_opt_or(VALUE recv, VALUE obj) {
29145 if (FIXNUM_2_P(recv, obj) &&
29146 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_OR)]&((1 << 0))) == 0), 1)))) {
29147 return recv | obj;
29148 }
29149 else {
29150 return ((VALUE)RUBY_Qundef);
29151 }
29152}
29153ALWAYS_INLINE(static inline VALUE
29154vm_opt_aref(VALUE recv, VALUE obj));
29155static inline VALUE
29156vm_opt_aref(VALUE recv, VALUE obj) {
29157 if (RB_SPECIAL_CONST_P(recv)) {
29158 if (FIXNUM_2_P(recv, obj) &&
29159 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 0))) == 0), 1)))) {
29160 return rb_fix_aref(recv, obj);
29161 }
29162 return ((VALUE)RUBY_Qundef);
29163 }
29164 else if (RBASIC_CLASS(recv) == rb_cArray &&
29165 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 3))) == 0), 1)))) {
29166 if (RB_FIXNUM_P(obj)) {
29167 return rb_ary_entry_internal(recv, rb_fix2long(obj));
29168 }
29169 else {
29170 return rb_ary_aref1(recv, obj);
29171 }
29172 }
29173 else if (RBASIC_CLASS(recv) == rb_cHash &&
29174 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 4))) == 0), 1)))) {
29175 return rb_hash_aref(recv, obj);
29176 }
29177 else {
29178 return ((VALUE)RUBY_Qundef);
29179 }
29180}
29181ALWAYS_INLINE(static inline VALUE
29182vm_opt_aset(VALUE recv, VALUE obj, VALUE set));
29183static inline VALUE
29184vm_opt_aset(VALUE recv, VALUE obj, VALUE set) {
29185 if (RB_SPECIAL_CONST_P(recv)) {
29186 return ((VALUE)RUBY_Qundef);
29187 }
29188 else if (RBASIC_CLASS(recv) == rb_cArray &&
29189 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 3))) == 0), 1))) &&
29190 RB_FIXNUM_P(obj)) {
29191 rb_ary_store(recv, rb_fix2long(obj), set);
29192 return set;
29193 }
29194 else if (RBASIC_CLASS(recv) == rb_cHash &&
29195 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 4))) == 0), 1)))) {
29196 rb_hash_aset(recv, obj, set);
29197 return set;
29198 }
29199 else {
29200 return ((VALUE)RUBY_Qundef);
29201 }
29202}
29203ALWAYS_INLINE(static inline VALUE
29204vm_opt_aref_with(VALUE recv, VALUE key));
29205static inline VALUE
29206vm_opt_aref_with(VALUE recv, VALUE key) {
29207 if (!RB_SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash &&
29208 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_AREF)]&((1 << 4))) == 0), 1))) &&
29209 rb_hash_compare_by_id_p(recv) == ((VALUE)RUBY_Qfalse)) {
29210 return rb_hash_aref(recv, key);
29211 }
29212 else {
29213 return ((VALUE)RUBY_Qundef);
29214 }
29215}
29216ALWAYS_INLINE(static inline VALUE
29217vm_opt_aset_with(VALUE recv, VALUE key, VALUE val));
29218static inline VALUE
29219vm_opt_aset_with(VALUE recv, VALUE key, VALUE val) {
29220 if (!RB_SPECIAL_CONST_P(recv) && RBASIC_CLASS(recv) == rb_cHash &&
29221 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_ASET)]&((1 << 4))) == 0), 1))) &&
29222 rb_hash_compare_by_id_p(recv) == ((VALUE)RUBY_Qfalse)) {
29223 return rb_hash_aset(recv, key, val);
29224 }
29225 else {
29226 return ((VALUE)RUBY_Qundef);
29227 }
29228}
29229
29230static VALUE
29231vm_opt_length(VALUE recv, int bop)
29232{
29233 if (RB_SPECIAL_CONST_P(recv)) {
29234 return ((VALUE)RUBY_Qundef);
29235 }
29236 else if (RBASIC_CLASS(recv) == rb_cString &&
29237 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 2))) == 0), 1)))) {
29238 if (bop == BOP_EMPTY_P) {
29239 return rb_long2num_inline(RSTRING_LEN(recv));
29240 }
29241 else {
29242 return rb_str_length(recv);
29243 }
29244 }
29245 else if (RBASIC_CLASS(recv) == rb_cArray &&
29246 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 3))) == 0), 1)))) {
29247 return rb_long2num_inline(rb_array_len(recv));
29248 }
29249 else if (RBASIC_CLASS(recv) == rb_cHash &&
29250 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(bop)]&((1 << 4))) == 0), 1)))) {
29251 return __builtin_choose_expr( __builtin_constant_p(RHASH_SIZE(recv)), ((VALUE)(RHASH_SIZE(recv))) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(RHASH_SIZE(recv)));
29252 }
29253 else {
29254 return ((VALUE)RUBY_Qundef);
29255 }
29256}
29257
29258static VALUE
29259vm_opt_empty_p(VALUE recv)
29260{
29261 switch (vm_opt_length(recv, BOP_EMPTY_P)) {
29262 case ((VALUE)RUBY_Qundef): return ((VALUE)RUBY_Qundef);
29263 case __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0)): return ((VALUE)RUBY_Qtrue);
29264 default: return ((VALUE)RUBY_Qfalse);
29265 }
29266}
29267
29268VALUE rb_false(VALUE obj);
29269
29270static VALUE
29271vm_opt_nil_p(const rb_iseq_t *iseq, CALL_DATA cd, VALUE recv)
29272{
29273 if (recv == ((VALUE)RUBY_Qnil) &&
29274 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_NIL_P)]&((1 << 9))) == 0), 1)))) {
29275 return ((VALUE)RUBY_Qtrue);
29276 }
29277 else if (vm_method_cfunc_is(iseq, cd, recv, rb_false)) {
29278 return ((VALUE)RUBY_Qfalse);
29279 }
29280 else {
29281 return ((VALUE)RUBY_Qundef);
29282 }
29283}
29284
29285static VALUE
29286fix_succ(VALUE x)
29287{
29288 switch (x) {
29289 case ~0UL:
29290
29291
29292 return __builtin_choose_expr( __builtin_constant_p(0), ((VALUE)(0)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(0));
29293 case ((~0UL)>>(int)(1)):
29294
29295
29296 return rb_uint2big(1UL << (8 * 8 - 2));
29297 default:
29298 return x + 2;
29299 }
29300}
29301
29302static VALUE
29303vm_opt_succ(VALUE recv)
29304{
29305 if (RB_FIXNUM_P(recv) &&
29306 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_SUCC)]&((1 << 0))) == 0), 1)))) {
29307 return fix_succ(recv);
29308 }
29309 else if (RB_SPECIAL_CONST_P(recv)) {
29310 return ((VALUE)RUBY_Qundef);
29311 }
29312 else if (RBASIC_CLASS(recv) == rb_cString &&
29313 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_SUCC)]&((1 << 2))) == 0), 1)))) {
29314 return rb_str_succ(recv);
29315 }
29316 else {
29317 return ((VALUE)RUBY_Qundef);
29318 }
29319}
29320ALWAYS_INLINE(static inline VALUE
29321vm_opt_not(const rb_iseq_t *iseq, CALL_DATA cd, VALUE recv));
29322static inline VALUE
29323vm_opt_not(const rb_iseq_t *iseq, CALL_DATA cd, VALUE recv) {
29324 if (vm_method_cfunc_is(iseq, cd, recv, rb_obj_not)) {
29325 return RB_TEST(recv) ? ((VALUE)RUBY_Qfalse) : ((VALUE)RUBY_Qtrue);
29326 }
29327 else {
29328 return ((VALUE)RUBY_Qundef);
29329 }
29330}
29331
29332static VALUE
29333vm_opt_regexpmatch2(VALUE recv, VALUE obj)
29334{
29335 if (RB_SPECIAL_CONST_P(recv)) {
29336 return ((VALUE)RUBY_Qundef);
29337 }
29338 else if (RBASIC_CLASS(recv) == rb_cString &&
29339 rb_class_of(obj) == rb_cRegexp &&
29340 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MATCH)]&((1 << 2))) == 0), 1)))) {
29341 return rb_reg_match(obj, recv);
29342 }
29343 else if (RBASIC_CLASS(recv) == rb_cRegexp &&
29344 ((__builtin_expect(!!((rb_current_vm()->redefined_flag[(BOP_MATCH)]&((1 << 8))) == 0), 1)))) {
29345 return rb_reg_match(recv, obj);
29346 }
29347 else {
29348 return ((VALUE)RUBY_Qundef);
29349 }
29350}
29351
29352rb_event_flag_t rb_iseq_event_flags(const rb_iseq_t *iseq, size_t pos);
29353
29354__declspec(noinline) static void vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *pc);
29355
29356static inline void
29357vm_trace_hook(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *pc,
29358 rb_event_flag_t pc_events, rb_event_flag_t target_event,
29359 rb_hook_list_t *global_hooks, rb_hook_list_t *local_hooks, VALUE val)
29360{
29361 rb_event_flag_t event = pc_events & target_event;
29362 VALUE self = (((((reg_cfp)))->self));
29363
29364 ((void)0);
29365
29366 if (event & global_hooks->events) {
29367
29368 reg_cfp->pc++;
29369 vm_dtrace(event, ec);
29370 rb_exec_event_hook_orig(ec, global_hooks, event, self, 0, 0, 0 , val, 0);
29371 reg_cfp->pc--;
29372 }
29373
29374 if (local_hooks != ((void*)0)) {
29375 if (event & local_hooks->events) {
29376
29377 reg_cfp->pc++;
29378 rb_exec_event_hook_orig(ec, local_hooks, event, self, 0, 0, 0 , val, 0);
29379 reg_cfp->pc--;
29380 }
29381 }
29382}static inline
29383
29384
29385_Bool
29386rb_vm_opt_cfunc_p(CALL_CACHE cc, int insn)
29387{
29388 switch (insn) {
29389 case YARVINSN_opt_eq:
29390 return check_cfunc(vm_cc_cme(cc), rb_obj_equal);
29391 case YARVINSN_opt_nil_p:
29392 return check_cfunc(vm_cc_cme(cc), rb_false);
29393 case YARVINSN_opt_not:
29394 return check_cfunc(vm_cc_cme(cc), rb_obj_not);
29395 default:
29396 return 0;
29397 }
29398}
29399
29400
29401
29402
29403
29404
29405static void
29406vm_trace(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const VALUE *pc)
29407{
29408 rb_event_flag_t enabled_flags = ruby_vm_event_flags & (0x0001 | 0x0002 | 0x0004 | 0x0008 | 0x0010| 0x0100| 0x0200| 0x010000| 0x020000);
29409
29410 if (enabled_flags == 0 && ruby_vm_event_local_num == 0) {
29411 return;
29412 }
29413 else {
29414 const rb_iseq_t *iseq = reg_cfp->iseq;
29415 size_t pos = pc - iseq->body->iseq_encoded;
29416 rb_event_flag_t pc_events = rb_iseq_event_flags(iseq, pos);
29417 rb_hook_list_t *local_hooks = iseq->aux.exec.local_hooks;
29418 rb_event_flag_t local_hook_events = local_hooks != ((void*)0) ? local_hooks->events : 0;
29419 enabled_flags |= local_hook_events;
29420
29421 ((void)0);
29422
29423 if ((pc_events & enabled_flags) == 0) {
29424 return;
29425 }
29426 else if (ec->trace_arg != ((void*)0)) {
29427
29428 return;
29429 }
29430 else {
29431 rb_hook_list_t *global_hooks = rb_vm_global_hooks(ec);
29432
29433 if (0) {
29434 __fprintf_chk (stderr, 2 - 1, "vm_trace>>%4d (%4x) - %s:%d %s\n", (int)pos, (int)pc_events, RSTRING_PTR(rb_iseq_path(iseq)), (int)rb_iseq_line_no(iseq, pos), RSTRING_PTR(rb_iseq_label(iseq)));
29435
29436
29437
29438
29439
29440 }
29441 ((void)0);
29442 ((void)0);
29443 ((void)0);
29444
29445
29446 do { if ((pc_events & (0x0002 | 0x0008 | 0x0100)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0002 | 0x0008 | 0x0100), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
29447 do { if ((pc_events & (0x0001)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0001), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
29448 do { if ((pc_events & (0x010000)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x010000), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
29449 do { if ((pc_events & (0x020000)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x020000), global_hooks, local_hooks, (((VALUE)RUBY_Qundef))); } } while (0);
29450 do { if ((pc_events & (0x0004 | 0x0010 | 0x0200)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (0x0004 | 0x0010 | 0x0200), global_hooks, local_hooks, ((*(((((reg_cfp)->sp)))-(0)-1)))); } } while (0);
29451 }
29452 }
29453}static inline
29454void Init_vm_stack_canary(void) { }
29455static VALUE
29456builtin_invoker0(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
29457{
29458 typedef VALUE (*rb_invoke_funcptr0_t)(rb_execution_context_t *ec, VALUE self);
29459 return (*(rb_invoke_funcptr0_t)funcptr)(ec, self);
29460}
29461
29462static VALUE
29463builtin_invoker1(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
29464{
29465 typedef VALUE (*rb_invoke_funcptr1_t)(rb_execution_context_t *ec, VALUE self, VALUE v1);
29466 return (*(rb_invoke_funcptr1_t)funcptr)(ec, self, argv[0]);
29467}
29468
29469static VALUE
29470builtin_invoker2(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
29471{
29472 typedef VALUE (*rb_invoke_funcptr2_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2);
29473 return (*(rb_invoke_funcptr2_t)funcptr)(ec, self, argv[0], argv[1]);
29474}
29475
29476static VALUE
29477builtin_invoker3(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
29478{
29479 typedef VALUE (*rb_invoke_funcptr3_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3);
29480 return (*(rb_invoke_funcptr3_t)funcptr)(ec, self, argv[0], argv[1], argv[2]);
29481}
29482
29483static VALUE
29484builtin_invoker4(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
29485{
29486 typedef VALUE (*rb_invoke_funcptr4_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4);
29487 return (*(rb_invoke_funcptr4_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3]);
29488}
29489
29490static VALUE
29491builtin_invoker5(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
29492{
29493 typedef VALUE (*rb_invoke_funcptr5_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5);
29494 return (*(rb_invoke_funcptr5_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4]);
29495}
29496
29497static VALUE
29498builtin_invoker6(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
29499{
29500 typedef VALUE (*rb_invoke_funcptr6_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6);
29501 return (*(rb_invoke_funcptr6_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5]);
29502}
29503
29504static VALUE
29505builtin_invoker7(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
29506{
29507 typedef VALUE (*rb_invoke_funcptr7_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7);
29508 return (*(rb_invoke_funcptr7_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6]);
29509}
29510
29511static VALUE
29512builtin_invoker8(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
29513{
29514 typedef VALUE (*rb_invoke_funcptr8_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8);
29515 return (*(rb_invoke_funcptr8_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7]);
29516}
29517
29518static VALUE
29519builtin_invoker9(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
29520{
29521 typedef VALUE (*rb_invoke_funcptr9_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9);
29522 return (*(rb_invoke_funcptr9_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8]);
29523}
29524
29525static VALUE
29526builtin_invoker10(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
29527{
29528 typedef VALUE (*rb_invoke_funcptr10_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10);
29529 return (*(rb_invoke_funcptr10_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9]);
29530}
29531
29532static VALUE
29533builtin_invoker11(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
29534{
29535 typedef VALUE (*rb_invoke_funcptr11_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11);
29536 return (*(rb_invoke_funcptr11_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10]);
29537}
29538
29539static VALUE
29540builtin_invoker12(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
29541{
29542 typedef VALUE (*rb_invoke_funcptr12_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12);
29543 return (*(rb_invoke_funcptr12_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11]);
29544}
29545
29546static VALUE
29547builtin_invoker13(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
29548{
29549 typedef VALUE (*rb_invoke_funcptr13_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12, VALUE v13);
29550 return (*(rb_invoke_funcptr13_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12]);
29551}
29552
29553static VALUE
29554builtin_invoker14(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
29555{
29556 typedef VALUE (*rb_invoke_funcptr14_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12, VALUE v13, VALUE v14);
29557 return (*(rb_invoke_funcptr14_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13]);
29558}
29559
29560static VALUE
29561builtin_invoker15(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr)
29562{
29563 typedef VALUE (*rb_invoke_funcptr15_t)(rb_execution_context_t *ec, VALUE self, VALUE v1, VALUE v2, VALUE v3, VALUE v4, VALUE v5, VALUE v6, VALUE v7, VALUE v8, VALUE v9, VALUE v10, VALUE v11, VALUE v12, VALUE v13, VALUE v14, VALUE v15);
29564 return (*(rb_invoke_funcptr15_t)funcptr)(ec, self, argv[0], argv[1], argv[2], argv[3], argv[4], argv[5], argv[6], argv[7], argv[8], argv[9], argv[10], argv[11], argv[12], argv[13], argv[14]);
29565}
29566
29567typedef VALUE (*builtin_invoker)(rb_execution_context_t *ec, VALUE self, const VALUE *argv, rb_insn_func_t funcptr);
29568
29569static builtin_invoker
29570lookup_builtin_invoker(int argc)
29571{
29572 static const builtin_invoker invokers[] = {
29573 builtin_invoker0,
29574 builtin_invoker1,
29575 builtin_invoker2,
29576 builtin_invoker3,
29577 builtin_invoker4,
29578 builtin_invoker5,
29579 builtin_invoker6,
29580 builtin_invoker7,
29581 builtin_invoker8,
29582 builtin_invoker9,
29583 builtin_invoker10,
29584 builtin_invoker11,
29585 builtin_invoker12,
29586 builtin_invoker13,
29587 builtin_invoker14,
29588 builtin_invoker15,
29589 };
29590
29591 return invokers[argc];
29592}
29593
29594static inline VALUE
29595invoke_bf(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, const struct rb_builtin_function* bf, const VALUE *argv)
29596{
29597 const _Bool canary_p = reg_cfp->iseq->body->builtin_inline_p;
29598 if (canary_p) {} else {};
29599 VALUE ret = (*lookup_builtin_invoker(bf->argc))(ec, reg_cfp->self, argv, (rb_insn_func_t)bf->func_ptr);
29600 if (canary_p) {(void)(YARVINSN_invokebuiltin);};
29601 return ret;
29602}
29603
29604static VALUE
29605vm_invoke_builtin(rb_execution_context_t *ec, rb_control_frame_t *cfp, const struct rb_builtin_function* bf, const VALUE *argv)
29606{
29607 return invoke_bf(ec, cfp, bf, argv);
29608}
29609
29610static VALUE
29611vm_invoke_builtin_delegate(rb_execution_context_t *ec, rb_control_frame_t *cfp, const struct rb_builtin_function *bf, unsigned int start_index)
29612{
29613 if (0) {
29614 __fprintf_chk (stderr, 2 - 1, "vm_invoke_builtin_delegate: passing -> ");
29615 for (int i=0; i<bf->argc; i++) {
29616 __fprintf_chk (stderr, 2 - 1, ":%s ", rb_id2name(cfp->iseq->body->local_table[i+start_index]));
29617 }
29618 __fprintf_chk (stderr, 2 - 1, "\n");
29619 __fprintf_chk (stderr, 2 - 1, "%s %s(%d):%p\n", __func__, bf->name, bf->argc, bf->func_ptr);
29620 }
29621
29622 if (bf->argc == 0) {
29623 return invoke_bf(ec, cfp, bf, ((void*)0));
29624 }
29625 else {
29626 const VALUE *argv = cfp->ep - cfp->iseq->body->local_table_size - ( 3) + 1 + start_index;
29627 return invoke_bf(ec, cfp, bf, argv);
29628 }
29629}static inline
29630
29631
29632
29633VALUE
29634rb_vm_lvar_exposed(rb_execution_context_t *ec, int index)
29635{
29636 const rb_control_frame_t *cfp = ec->cfp;
29637 return cfp->ep[index];
29638}
29639
29640
29641
29642
29643
29644
29645
29646struct local_var_list {
29647 VALUE tbl;
29648};
29649
29650static inline VALUE method_missing(rb_execution_context_t *ec, VALUE obj, ID id, int argc, const VALUE *argv, enum method_missing_reason call_status, int kw_splat);
29651static inline VALUE vm_yield_with_cref(rb_execution_context_t *ec, int argc, const VALUE *argv, int kw_splat, const rb_cref_t *cref, int is_lambda);
29652static inline VALUE vm_yield(rb_execution_context_t *ec, int argc, const VALUE *argv, int kw_splat);
29653static inline VALUE vm_yield_with_block(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE block_handler, int kw_splat);
29654static inline VALUE vm_yield_force_blockarg(rb_execution_context_t *ec, VALUE args);
29655VALUE rb_vm_exec(rb_execution_context_t *ec, int mjit_enable_p);
29656static void vm_set_eval_stack(rb_execution_context_t * th, const rb_iseq_t *iseq, const rb_cref_t *cref, const struct rb_block *base_block);
29657static int vm_collect_local_variables_in_heap(const VALUE *dfp, const struct local_var_list *vars);
29658
29659static VALUE rb_eUncaughtThrow;
29660static ID id_result, id_tag, id_value;
29661
29662typedef enum call_type {
29663 CALL_PUBLIC,
29664 CALL_FCALL,
29665 CALL_VCALL,
29666 CALL_PUBLIC_KW,
29667 CALL_FCALL_KW,
29668 CALL_TYPE_MAX
29669} call_type;
29670
29671static VALUE send_internal(int argc, const VALUE *argv, VALUE recv, call_type scope);
29672static VALUE vm_call0_body(rb_execution_context_t* ec, struct rb_calling_info *calling, struct rb_call_data *cd, const VALUE *argv);
29673static inline void
29674stack_check(rb_execution_context_t *ec)
29675{
29676 if (!(((ec)->raised_flag & (RAISED_STACKOVERFLOW)) != 0) &&
29677 rb_ec_stack_check(ec)) {
29678 ((ec)->raised_flag |= (RAISED_STACKOVERFLOW));
29679 rb_ec_stack_overflow(ec, 0);
29680 }
29681}
29682static void
29683raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv, VALUE obj,
29684 enum method_missing_reason last_call_status)
29685{
29686 VALUE exc = rb_eNoMethodError;
29687 VALUE format = 0;
29688
29689 if ((__builtin_expect(!!(argc == 0), 0))) {
29690 rb_raise(rb_eArgError, "no method name given");
29691 }
29692 else if ((__builtin_expect(!!(!RB_SYMBOL_P(argv[0])), 0))) {
29693 const VALUE e = rb_eArgError;
29694 rb_raise(e, "method name must be a Symbol but %""l""i" "\v"" is given",
29695 rb_obj_class(argv[0]));
29696 }
29697
29698 stack_check(ec);
29699
29700 if (last_call_status & MISSING_PRIVATE) {
29701 format = rb_fstring_new(("private method `%s' called for %s%s%s"), (sizeof("private method `%s' called for %s%s%s" "") - 1));
29702 }
29703 else if (last_call_status & MISSING_PROTECTED) {
29704 format = rb_fstring_new(("protected method `%s' called for %s%s%s"), (sizeof("protected method `%s' called for %s%s%s" "") - 1));
29705 }
29706 else if (last_call_status & MISSING_VCALL) {
29707 format = rb_fstring_new(("undefined local variable or method `%s' for %s%s%s"), (sizeof("undefined local variable or method `%s' for %s%s%s" "") - 1));
29708 exc = rb_eNameError;
29709 }
29710 else if (last_call_status & MISSING_SUPER) {
29711 format = rb_fstring_new(("super: no superclass method `%s' for %s%s%s"), (sizeof("super: no superclass method `%s' for %s%s%s" "") - 1));
29712 }
29713
29714 {
29715 exc = rb_make_no_method_exception(exc, format, obj, argc, argv,
29716 last_call_status & (MISSING_FCALL|MISSING_VCALL));
29717 if (!(last_call_status & MISSING_MISSING)) {
29718 rb_vm_pop_cfunc_frame();
29719 }
29720 rb_exc_raise(exc);
29721 }
29722}
29723
29724static void
29725vm_raise_method_missing(rb_execution_context_t *ec, int argc, const VALUE *argv,
29726 VALUE obj, int call_status)
29727{
29728 vm_passed_block_handler_set(ec, 0);
29729 raise_method_missing(ec, argc, argv, obj, call_status | MISSING_MISSING);
29730}
29731
29732static inline VALUE
29733method_missing(rb_execution_context_t *ec, VALUE obj, ID id, int argc, const VALUE *argv, enum method_missing_reason call_status, int kw_splat)
29734{
29735 VALUE *nargv, result, work, klass;
29736 VALUE block_handler = vm_passed_block_handler(ec);
29738
29739 ec->method_missing_reason = call_status;
29740
29741 if (id == idMethodMissing) {
29742 goto missing;
29743 }
29744
29745 nargv = ((VALUE *) (((size_t)(argc + 1) < 1024 / sizeof(VALUE)) ? ((work) = 0, __builtin_alloca ((argc + 1) * sizeof(VALUE))) : rb_alloc_tmp_buffer2(&(work), (argc + 1), sizeof(VALUE))));
29746 nargv[0] = rb_id2sym(id);
29747
29748 if (!argv) {
29749 static const VALUE buf = ((VALUE)RUBY_Qfalse);
29750 ((void)0);
29751 argv = &buf;
29752 }
29753
29754 ruby_nonempty_memcpy((nargv + 1), (argv), rbimpl_size_mul_or_raise(sizeof(VALUE), (argc)));
29755 ++argc;
29756 argv = nargv;
29757
29758 klass = rb_class_of(obj);
29759 if (!klass) goto missing;
29760 me = rb_callable_method_entry(klass, idMethodMissing);
29761 if (!me || (int) (((me)->flags & (((VALUE)RUBY_FL_USER6) )) >> ((((VALUE)RUBY_FL_USHIFT) + 4)+2))) goto missing;
29762 vm_passed_block_handler_set(ec, block_handler);
29763 result = rb_vm_call_kw(ec, obj, idMethodMissing, argc, argv, me, kw_splat);
29764 if (work) rb_free_tmp_buffer(&(work));
29765 return result;
29766 missing:
29767 raise_method_missing(ec, argc, argv, obj, call_status | MISSING_MISSING);
29768 __builtin_unreachable();
29769}
29770static rb_control_frame_t *
29771vm_get_ruby_level_caller_cfp(const rb_execution_context_t *ec, const rb_control_frame_t *cfp)
29772{
29773 if (VM_FRAME_RUBYFRAME_P(cfp)) {
29774 return (rb_control_frame_t *)cfp;
29775 }
29776
29777 cfp = ((cfp)+1);
29778
29779 while (!RUBY_VM_CONTROL_FRAME_STACK_OVERFLOW_P(ec, cfp)) {
29780 if (VM_FRAME_RUBYFRAME_P(cfp)) {
29781 return (rb_control_frame_t *)cfp;
29782 }
29783
29784 if (VM_ENV_FLAGS(cfp->ep, VM_FRAME_FLAG_PASSED) == 0) {
29785 break;
29786 }
29787 cfp = ((cfp)+1);
29788 }
29789 return 0;
29790}
29791
29792static void
29793rb_vm_pop_cfunc_frame(void)
29794{
29795 rb_execution_context_t *ec = rb_current_execution_context();
29796 rb_control_frame_t *cfp = ec->cfp;
29797 const rb_callable_method_entry_t *me = rb_vm_frame_method_entry(cfp);
29798
29799 do { const rb_event_flag_t flag_arg_ = (0x0040); rb_hook_list_t *hooks_arg_ = (rb_vm_global_hooks(ec)); if ((__builtin_expect(!!((hooks_arg_)->events & (flag_arg_)), 0))) { rb_exec_event_hook_orig(ec, hooks_arg_, flag_arg_, cfp->self, me->def->original_id, me->called_id, me->owner, ((VALUE)RUBY_Qnil), 0); } } while (0);
29800 do { if ((__builtin_expect(!!(0), 0))) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, me->owner, me->def->original_id, &args)) { do {} while (0); } } } while (0);
29801 vm_pop_frame(ec, cfp, cfp->ep);
29802}
29803static VALUE
29804vm_call_iseq_setup_normal_0start_0params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29805{
29806 ((void)0);
29807 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 0, 0);
29808}
29809
29810static VALUE
29811vm_call_iseq_setup_normal_0start_0params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29812{
29813 ((void)0);
29814 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 0, 1);
29815}
29816
29817static VALUE
29818vm_call_iseq_setup_normal_0start_0params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29819{
29820 ((void)0);
29821 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 0, 2);
29822}
29823
29824static VALUE
29825vm_call_iseq_setup_normal_0start_0params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29826{
29827 ((void)0);
29828 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 0, 3);
29829}
29830
29831static VALUE
29832vm_call_iseq_setup_normal_0start_0params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29833{
29834 ((void)0);
29835 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 0, 4);
29836}
29837
29838static VALUE
29839vm_call_iseq_setup_normal_0start_0params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29840{
29841 ((void)0);
29842 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 0, 5);
29843}
29844
29845static VALUE
29846vm_call_iseq_setup_normal_0start_1params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29847{
29848 ((void)0);
29849 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 1, 0);
29850}
29851
29852static VALUE
29853vm_call_iseq_setup_normal_0start_1params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29854{
29855 ((void)0);
29856 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 1, 1);
29857}
29858
29859static VALUE
29860vm_call_iseq_setup_normal_0start_1params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29861{
29862 ((void)0);
29863 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 1, 2);
29864}
29865
29866static VALUE
29867vm_call_iseq_setup_normal_0start_1params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29868{
29869 ((void)0);
29870 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 1, 3);
29871}
29872
29873static VALUE
29874vm_call_iseq_setup_normal_0start_1params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29875{
29876 ((void)0);
29877 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 1, 4);
29878}
29879
29880static VALUE
29881vm_call_iseq_setup_normal_0start_1params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29882{
29883 ((void)0);
29884 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 1, 5);
29885}
29886
29887static VALUE
29888vm_call_iseq_setup_normal_0start_2params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29889{
29890 ((void)0);
29891 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 2, 0);
29892}
29893
29894static VALUE
29895vm_call_iseq_setup_normal_0start_2params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29896{
29897 ((void)0);
29898 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 2, 1);
29899}
29900
29901static VALUE
29902vm_call_iseq_setup_normal_0start_2params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29903{
29904 ((void)0);
29905 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 2, 2);
29906}
29907
29908static VALUE
29909vm_call_iseq_setup_normal_0start_2params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29910{
29911 ((void)0);
29912 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 2, 3);
29913}
29914
29915static VALUE
29916vm_call_iseq_setup_normal_0start_2params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29917{
29918 ((void)0);
29919 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 2, 4);
29920}
29921
29922static VALUE
29923vm_call_iseq_setup_normal_0start_2params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29924{
29925 ((void)0);
29926 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 2, 5);
29927}
29928
29929static VALUE
29930vm_call_iseq_setup_normal_0start_3params_0locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29931{
29932 ((void)0);
29933 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 3, 0);
29934}
29935
29936static VALUE
29937vm_call_iseq_setup_normal_0start_3params_1locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29938{
29939 ((void)0);
29940 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 3, 1);
29941}
29942
29943static VALUE
29944vm_call_iseq_setup_normal_0start_3params_2locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29945{
29946 ((void)0);
29947 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 3, 2);
29948}
29949
29950static VALUE
29951vm_call_iseq_setup_normal_0start_3params_3locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29952{
29953 ((void)0);
29954 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 3, 3);
29955}
29956
29957static VALUE
29958vm_call_iseq_setup_normal_0start_3params_4locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29959{
29960 ((void)0);
29961 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 3, 4);
29962}
29963
29964static VALUE
29965vm_call_iseq_setup_normal_0start_3params_5locals(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_calling_info *calling, struct rb_call_data *cd)
29966{
29967 ((void)0);
29968 return vm_call_iseq_setup_normal(ec, cfp, calling, vm_cc_cme(cd->cc), 0, 3, 5);
29969}
29970
29971
29972static const vm_call_handler vm_call_iseq_handlers[][6] = {
29973 {
29974 vm_call_iseq_setup_normal_0start_0params_0locals,
29975 vm_call_iseq_setup_normal_0start_0params_1locals,
29976 vm_call_iseq_setup_normal_0start_0params_2locals,
29977 vm_call_iseq_setup_normal_0start_0params_3locals,
29978 vm_call_iseq_setup_normal_0start_0params_4locals,
29979 vm_call_iseq_setup_normal_0start_0params_5locals,
29980 },
29981 {
29982 vm_call_iseq_setup_normal_0start_1params_0locals,
29983 vm_call_iseq_setup_normal_0start_1params_1locals,
29984 vm_call_iseq_setup_normal_0start_1params_2locals,
29985 vm_call_iseq_setup_normal_0start_1params_3locals,
29986 vm_call_iseq_setup_normal_0start_1params_4locals,
29987 vm_call_iseq_setup_normal_0start_1params_5locals,
29988 },
29989 {
29990 vm_call_iseq_setup_normal_0start_2params_0locals,
29991 vm_call_iseq_setup_normal_0start_2params_1locals,
29992 vm_call_iseq_setup_normal_0start_2params_2locals,
29993 vm_call_iseq_setup_normal_0start_2params_3locals,
29994 vm_call_iseq_setup_normal_0start_2params_4locals,
29995 vm_call_iseq_setup_normal_0start_2params_5locals,
29996 },
29997 {
29998 vm_call_iseq_setup_normal_0start_3params_0locals,
29999 vm_call_iseq_setup_normal_0start_3params_1locals,
30000 vm_call_iseq_setup_normal_0start_3params_2locals,
30001 vm_call_iseq_setup_normal_0start_3params_3locals,
30002 vm_call_iseq_setup_normal_0start_3params_4locals,
30003 vm_call_iseq_setup_normal_0start_3params_5locals,
30004 },
30005};
30006
30007static inline vm_call_handler
30008vm_call_iseq_setup_func(const struct rb_callinfo *ci, const int param_size, const int local_size)
30009{
30010 if ((__builtin_expect(!!(vm_ci_flag(ci) & (0x01 << VM_CALL_TAILCALL_bit)), 0))) {
30011 return &vm_call_iseq_setup_tailcall_0start;
30012 }
30013 else if (0) {
30014 return &vm_call_iseq_setup_normal_0start;
30015 }
30016 else if (param_size <= 3 && local_size <= 5) {
30017 ((void)0);
30018 return vm_call_iseq_handlers[param_size][local_size];
30019 }
30020 else {
30021 return &vm_call_iseq_setup_normal_0start;
30022 }
30023}
30024
30025#define MJIT_HEADER 1
30026#define _FORTIFY_SOURCE 2
30027#define RUBY_DEVEL 1
30028#define RUBY_EXPORT 1
30029#define CANONICALIZATION_FOR_MATHN 1
30030#define vm_exec rb_vm_exec
30031#define RUBY_EVAL_INTERN_H
30032#define RUBY_RUBY_H 1
30033#define RBIMPL_CONFIG_H
30034#define INCLUDE_RUBY_CONFIG_H 1
30035#define STDC_HEADERS 1
30036#define HAVE_SYS_TYPES_H 1
30037#define HAVE_SYS_STAT_H 1
30038#define HAVE_STDLIB_H 1
30039#define HAVE_STRING_H 1
30040#define HAVE_MEMORY_H 1
30041#define HAVE_STRINGS_H 1
30042#define HAVE_INTTYPES_H 1
30043#define HAVE_STDINT_H 1
30044#define HAVE_UNISTD_H 1
30045#define __EXTENSIONS__ 1
30046#define _ALL_SOURCE 1
30047#define _GNU_SOURCE 1
30048#define _POSIX_PTHREAD_SEMANTICS 1
30049#define _TANDEM_SOURCE 1
30050#define RUBY_SYMBOL_EXPORT_BEGIN _Pragma("GCC visibility push(default)")
30051#define RUBY_SYMBOL_EXPORT_END _Pragma("GCC visibility pop")
30052#define HAVE_STMT_AND_DECL_IN_EXPR 1
30053#define HAVE_LIBCRYPT 1
30054#define HAVE_LIBDL 1
30055#define HAVE_DIRENT_H 1
30056#define HAVE__BOOL 1
30057#define HAVE_STDBOOL_H 1
30058#define HAVE_SYS_WAIT_H 1
30059#define HAVE_A_OUT_H 1
30060#define HAVE_GRP_H 1
30061#define HAVE_FCNTL_H 1
30062#define HAVE_FLOAT_H 1
30063#define HAVE_LANGINFO_H 1
30064#define HAVE_LIMITS_H 1
30065#define HAVE_LOCALE_H 1
30066#define HAVE_MALLOC_H 1
30067#define HAVE_PWD_H 1
30068#define HAVE_SANITIZER_ASAN_INTERFACE_H 1
30069#define HAVE_SANITIZER_MSAN_INTERFACE_H 1
30070#define HAVE_STDALIGN_H 1
30071#define HAVE_SYS_EVENTFD_H 1
30072#define HAVE_SYS_FCNTL_H 1
30073#define HAVE_SYS_FILE_H 1
30074#define HAVE_SYS_IOCTL_H 1
30075#define HAVE_SYS_PARAM_H 1
30076#define HAVE_SYS_PRCTL_H 1
30077#define HAVE_SYS_RESOURCE_H 1
30078#define HAVE_SYS_SELECT_H 1
30079#define HAVE_SYS_SENDFILE_H 1
30080#define HAVE_SYS_SOCKET_H 1
30081#define HAVE_SYS_SYSCALL_H 1
30082#define HAVE_SYS_SYSMACROS_H 1
30083#define HAVE_SYS_TIME_H 1
30084#define HAVE_SYS_TIMES_H 1
30085#define HAVE_SYS_UIO_H 1
30086#define HAVE_SYSCALL_H 1
30087#define HAVE_TIME_H 1
30088#define HAVE_UCONTEXT_H 1
30089#define HAVE_UTIME_H 1
30090#define HAVE_X86INTRIN_H 1
30091#define HAVE_GMP_H 1
30092#define HAVE_LIBGMP 1
30093#define HAVE_TYPEOF 1
30094#define restrict __restrict
30095#define HAVE_LONG_LONG 1
30096#define HAVE_OFF_T 1
30097#define SIZEOF_INT 4
30098#define SIZEOF_SHORT 2
30099#define SIZEOF_LONG 8
30100#define SIZEOF_LONG_LONG 8
30101#define SIZEOF___INT64 0
30102#define SIZEOF___INT128 16
30103#define SIZEOF_OFF_T 8
30104#define SIZEOF_VOIDP 8
30105#define SIZEOF_FLOAT 4
30106#define SIZEOF_DOUBLE 8
30107#define SIZEOF_TIME_T 8
30108#define SIZEOF_CLOCK_T 8
30109#define PACKED_STRUCT(x) x __attribute__((packed))
30110#define USE_UNALIGNED_MEMBER_ACCESS 1
30111#define PRI_LL_PREFIX "ll"
30112#define HAVE_PID_T 1
30113#define rb_pid_t pid_t
30114#define SIGNEDNESS_OF_PID_T -1
30115#define PIDT2NUM(v) INT2NUM(v)
30116#define NUM2PIDT(v) NUM2INT(v)
30117#define PRI_PIDT_PREFIX PRI_INT_PREFIX
30118#define HAVE_UID_T 1
30119#define rb_uid_t uid_t
30120#define SIGNEDNESS_OF_UID_T +1
30121#define UIDT2NUM(v) UINT2NUM(v)
30122#define NUM2UIDT(v) NUM2UINT(v)
30123#define PRI_UIDT_PREFIX PRI_INT_PREFIX
30124#define HAVE_GID_T 1
30125#define rb_gid_t gid_t
30126#define SIGNEDNESS_OF_GID_T +1
30127#define GIDT2NUM(v) UINT2NUM(v)
30128#define NUM2GIDT(v) NUM2UINT(v)
30129#define PRI_GIDT_PREFIX PRI_INT_PREFIX
30130#define HAVE_TIME_T 1
30131#define rb_time_t time_t
30132#define SIGNEDNESS_OF_TIME_T -1
30133#define TIMET2NUM(v) LONG2NUM(v)
30134#define NUM2TIMET(v) NUM2LONG(v)
30135#define PRI_TIMET_PREFIX PRI_LONG_PREFIX
30136#define HAVE_DEV_T 1
30137#define rb_dev_t dev_t
30138#define SIGNEDNESS_OF_DEV_T +1
30139#define DEVT2NUM(v) ULONG2NUM(v)
30140#define NUM2DEVT(v) NUM2ULONG(v)
30141#define PRI_DEVT_PREFIX PRI_LONG_PREFIX
30142#define HAVE_MODE_T 1
30143#define rb_mode_t mode_t
30144#define SIGNEDNESS_OF_MODE_T +1
30145#define MODET2NUM(v) UINT2NUM(v)
30146#define NUM2MODET(v) NUM2UINT(v)
30147#define PRI_MODET_PREFIX PRI_INT_PREFIX
30148#define HAVE_RLIM_T 1
30149#define rb_rlim_t rlim_t
30150#define SIGNEDNESS_OF_RLIM_T +1
30151#define RLIM2NUM(v) ULONG2NUM(v)
30152#define NUM2RLIM(v) NUM2ULONG(v)
30153#define PRI_RLIM_PREFIX PRI_LONG_PREFIX
30154#define HAVE_OFF_T 1
30155#define rb_off_t off_t
30156#define SIGNEDNESS_OF_OFF_T -1
30157#define OFFT2NUM(v) LONG2NUM(v)
30158#define NUM2OFFT(v) NUM2LONG(v)
30159#define PRI_OFFT_PREFIX PRI_LONG_PREFIX
30160#define HAVE_CLOCKID_T 1
30161#define rb_clockid_t clockid_t
30162#define SIGNEDNESS_OF_CLOCKID_T -1
30163#define CLOCKID2NUM(v) INT2NUM(v)
30164#define NUM2CLOCKID(v) NUM2INT(v)
30165#define PRI_CLOCKID_PREFIX PRI_INT_PREFIX
30166#define HAVE_PROTOTYPES 1
30167#define TOKEN_PASTE(x,y) x##y
30168#define STRINGIZE(expr) STRINGIZE0(expr)
30169#define HAVE_STDARG_PROTOTYPES 1
30170#define HAVE_VA_ARGS_MACRO 1
30171#define RUBY_ALIGNAS(x) __attribute__((__aligned__(x)))
30172#define RUBY_ALIGNOF alignof
30173#define CONSTFUNC(x) __attribute__ ((__const__)) x
30174#define PUREFUNC(x) __attribute__ ((__pure__)) x
30175#define NORETURN(x) __attribute__ ((__noreturn__)) x
30176#define DEPRECATED(x) __attribute__ ((__deprecated__)) x
30177#define DEPRECATED_BY(n,x) __attribute__ ((__deprecated__("by "#n))) x
30178#define DEPRECATED_TYPE(mesg,x) x __attribute__ ((__deprecated__ mesg))
30179#define NOINLINE(x) __attribute__ ((__noinline__)) x
30180#define NO_SANITIZE(san,x) __attribute__ ((__no_sanitize__(san))) x
30181#define NO_SANITIZE_ADDRESS(x) __attribute__ ((__no_sanitize_address__)) x
30182#define NO_ADDRESS_SAFETY_ANALYSIS(x) __attribute__ ((__no_address_safety_analysis__)) x
30183#define WARN_UNUSED_RESULT(x) __attribute__ ((__warn_unused_result__)) x
30184#define MAYBE_UNUSED(x) __attribute__ ((__unused__)) x
30185#define WEAK(x) __attribute__ ((__weak__)) x
30186#define HAVE_FUNC_WEAK 1
30187#define RUBY_CXX_DEPRECATED(msg) __attribute__((__deprecated__(msg)))
30188#define HAVE_NULLPTR 1
30189#define FUNC_CDECL(x) __attribute__ ((__cdecl__)) x
30190#define HAVE_ATTRIBUTE_FUNCTION_ALIAS 1
30191#define RUBY_ALIAS_FUNCTION_TYPE(type,prot,name,args) type prot __attribute__((alias(#name)));
30192#define RUBY_ALIAS_FUNCTION_VOID(prot,name,args) RUBY_ALIAS_FUNCTION_TYPE(void, prot, name, args)
30193#define HAVE_GCC_ATOMIC_BUILTINS 1
30194#define HAVE_GCC_SYNC_BUILTINS 1
30195#define UNREACHABLE __builtin_unreachable()
30196#define RUBY_FUNC_EXPORTED __attribute__ ((__visibility__("default"))) extern
30197#define RUBY_FUNC_NONNULL(n,x) __attribute__ ((__nonnull__(n))) x
30198#define RUBY_FUNCTION_NAME_STRING __func__
30199#define ENUM_OVER_INT 1
30200#define HAVE_DECL_SYS_NERR 1
30201#define HAVE_DECL_GETENV 1
30202#define SIZEOF_SIZE_T 8
30203#define SIZEOF_PTRDIFF_T 8
30204#define PRI_SIZE_PREFIX "z"
30205#define PRI_PTRDIFF_PREFIX "t"
30206#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
30207#define HAVE_ST_BLKSIZE 1
30208#define HAVE_STRUCT_STAT_ST_BLOCKS 1
30209#define HAVE_ST_BLOCKS 1
30210#define HAVE_STRUCT_STAT_ST_RDEV 1
30211#define HAVE_ST_RDEV 1
30212#define SIZEOF_STRUCT_STAT_ST_SIZE SIZEOF_OFF_T
30213#define SIZEOF_STRUCT_STAT_ST_BLOCKS SIZEOF_OFF_T
30214#define SIZEOF_STRUCT_STAT_ST_INO SIZEOF_LONG
30215#define HAVE_STRUCT_STAT_ST_ATIM 1
30216#define HAVE_STRUCT_STAT_ST_MTIM 1
30217#define HAVE_STRUCT_STAT_ST_CTIM 1
30218#define HAVE_STRUCT_STATX_STX_BTIME 1
30219#define HAVE_STRUCT_TIMEVAL 1
30220#define SIZEOF_STRUCT_TIMEVAL_TV_SEC SIZEOF_TIME_T
30221#define HAVE_STRUCT_TIMESPEC 1
30222#define HAVE_STRUCT_TIMEZONE 1
30223#define HAVE_RB_FD_INIT 1
30224#define HAVE_INT8_T 1
30225#define SIZEOF_INT8_T 1
30226#define HAVE_UINT8_T 1
30227#define SIZEOF_UINT8_T 1
30228#define HAVE_INT16_T 1
30229#define SIZEOF_INT16_T 2
30230#define HAVE_UINT16_T 1
30231#define SIZEOF_UINT16_T 2
30232#define HAVE_INT32_T 1
30233#define SIZEOF_INT32_T 4
30234#define HAVE_UINT32_T 1
30235#define SIZEOF_UINT32_T 4
30236#define HAVE_INT64_T 1
30237#define SIZEOF_INT64_T 8
30238#define HAVE_UINT64_T 1
30239#define SIZEOF_UINT64_T 8
30240#define HAVE_INT128_T 1
30241#define int128_t __int128
30242#define SIZEOF_INT128_T SIZEOF___INT128
30243#define HAVE_UINT128_T 1
30244#define uint128_t unsigned __int128
30245#define SIZEOF_UINT128_T SIZEOF___INT128
30246#define HAVE_INTPTR_T 1
30247#define SIZEOF_INTPTR_T 8
30248#define HAVE_UINTPTR_T 1
30249#define SIZEOF_UINTPTR_T 8
30250#define HAVE_SSIZE_T 1
30251#define SIZEOF_SSIZE_T 8
30252#define STACK_END_ADDRESS __libc_stack_end
30253#define GETGROUPS_T gid_t
30254#define RETSIGTYPE void
30255#define HAVE_ALLOCA_H 1
30256#define HAVE_ALLOCA 1
30257#define HAVE_ACOSH 1
30258#define HAVE_CBRT 1
30259#define HAVE_CRYPT 1
30260#define HAVE_DUP2 1
30261#define HAVE_ERF 1
30262#define HAVE_EXPLICIT_BZERO 1
30263#define HAVE_FFS 1
30264#define HAVE_FLOCK 1
30265#define HAVE_HYPOT 1
30266#define HAVE_LGAMMA_R 1
30267#define HAVE_MEMMOVE 1
30268#define HAVE_NAN 1
30269#define HAVE_NEXTAFTER 1
30270#define HAVE_STRCHR 1
30271#define HAVE_STRERROR 1
30272#define HAVE_STRSTR 1
30273#define HAVE_TGAMMA 1
30274#define HAVE_FINITE 1
30275#define HAVE_ISINF 1
30276#define HAVE_ISNAN 1
30277#define SPT_TYPE SPT_REUSEARGV
30278#define HAVE_SIGNBIT 1
30279#define HAVE_FORK 1
30280#define HAVE_VFORK 1
30281#define HAVE_WORKING_VFORK 1
30282#define HAVE_WORKING_FORK 1
30283#define HAVE__LONGJMP 1
30284#define HAVE_ATAN2L 1
30285#define HAVE_ATAN2F 1
30286#define HAVE_CHROOT 1
30287#define HAVE_CLOCK_GETTIME 1
30288#define HAVE_COPY_FILE_RANGE 1
30289#define HAVE_COSH 1
30290#define HAVE_CRYPT_R 1
30291#define HAVE_DIRFD 1
30292#define HAVE_DL_ITERATE_PHDR 1
30293#define HAVE_DLOPEN 1
30294#define HAVE_DLADDR 1
30295#define HAVE_DUP 1
30296#define HAVE_DUP3 1
30297#define HAVE_EACCESS 1
30298#define HAVE_ENDGRENT 1
30299#define HAVE_EVENTFD 1
30300#define HAVE_FCHMOD 1
30301#define HAVE_FCHOWN 1
30302#define HAVE_FCNTL 1
30303#define HAVE_FDATASYNC 1
30304#define HAVE_FDOPENDIR 1
30305#define HAVE_FMOD 1
30306#define HAVE_FSTATAT 1
30307#define HAVE_FSYNC 1
30308#define HAVE_FTRUNCATE 1
30309#define HAVE_FTRUNCATE64 1
30310#define HAVE_GETCWD 1
30311#define HAVE_GETGRNAM 1
30312#define HAVE_GETGRNAM_R 1
30313#define HAVE_GETGROUPS 1
30314#define HAVE_GETLOGIN 1
30315#define HAVE_GETLOGIN_R 1
30316#define HAVE_GETPGID 1
30317#define HAVE_GETPGRP 1
30318#define HAVE_GETPRIORITY 1
30319#define HAVE_GETPWNAM 1
30320#define HAVE_GETPWNAM_R 1
30321#define HAVE_GETPWUID 1
30322#define HAVE_GETPWUID_R 1
30323#define HAVE_GETRANDOM 1
30324#define HAVE_GETRESGID 1
30325#define HAVE_GETRESUID 1
30326#define HAVE_GETRLIMIT 1
30327#define HAVE_GETSID 1
30328#define HAVE_GETTIMEOFDAY 1
30329#define HAVE_GMTIME_R 1
30330#define HAVE_GRANTPT 1
30331#define HAVE_INITGROUPS 1
30332#define HAVE_IOCTL 1
30333#define HAVE_KILLPG 1
30334#define HAVE_LCHOWN 1
30335#define HAVE_LINK 1
30336#define HAVE_LLABS 1
30337#define HAVE_LOCKF 1
30338#define HAVE_LOG2 1
30339#define HAVE_LSTAT 1
30340#define HAVE_LUTIMES 1
30341#define HAVE_MALLOC_USABLE_SIZE 1
30342#define HAVE_MBLEN 1
30343#define HAVE_MEMALIGN 1
30344#define HAVE_WRITEV 1
30345#define HAVE_MEMRCHR 1
30346#define HAVE_MEMMEM 1
30347#define HAVE_MKFIFO 1
30348#define HAVE_MKNOD 1
30349#define HAVE_MKTIME 1
30350#define HAVE_OPENAT 1
30351#define HAVE_PIPE2 1
30352#define HAVE_POLL 1
30353#define HAVE_POSIX_FADVISE 1
30354#define HAVE_POSIX_MEMALIGN 1
30355#define HAVE_PPOLL 1
30356#define HAVE_PREAD 1
30357#define HAVE_PWRITE 1
30358#define HAVE_QSORT_R 1
30359#define HAVE_READLINK 1
30360#define HAVE_REALPATH 1
30361#define HAVE_ROUND 1
30362#define HAVE_SCHED_GETAFFINITY 1
30363#define HAVE_SEEKDIR 1
30364#define HAVE_SENDFILE 1
30365#define HAVE_SETEGID 1
30366#define HAVE_SETENV 1
30367#define HAVE_SETEUID 1
30368#define HAVE_SETGID 1
30369#define HAVE_SETGROUPS 1
30370#define HAVE_SETPGID 1
30371#define HAVE_SETPGRP 1
30372#define HAVE_SETREGID 1
30373#define HAVE_SETRESGID 1
30374#define HAVE_SETRESUID 1
30375#define HAVE_SETREUID 1
30376#define HAVE_SETRLIMIT 1
30377#define HAVE_SETSID 1
30378#define HAVE_SETUID 1
30379#define HAVE_SHUTDOWN 1
30380#define HAVE_SIGACTION 1
30381#define HAVE_SIGALTSTACK 1
30382#define HAVE_SIGPROCMASK 1
30383#define HAVE_SINH 1
30384#define HAVE_SYMLINK 1
30385#define HAVE_SYSCALL 1
30386#define HAVE_SYSCONF 1
30387#define HAVE_TANH 1
30388#define HAVE_TELLDIR 1
30389#define HAVE_TIMEGM 1
30390#define HAVE_TIMES 1
30391#define HAVE_TRUNCATE 1
30392#define HAVE_TRUNCATE64 1
30393#define HAVE_UNSETENV 1
30394#define HAVE_UTIMENSAT 1
30395#define HAVE_UTIMES 1
30396#define HAVE_WAIT4 1
30397#define HAVE_WAITPID 1
30398#define HAVE_STATX 1
30399#define HAVE_CRYPT_H 1
30400#define HAVE_STRUCT_CRYPT_DATA_INITIALIZED 1
30401#define HAVE_BUILTIN___BUILTIN_ALLOCA_WITH_ALIGN 1
30402#define HAVE_BUILTIN___BUILTIN_ASSUME_ALIGNED 1
30403#define HAVE_BUILTIN___BUILTIN_BSWAP16 1
30404#define HAVE_BUILTIN___BUILTIN_BSWAP32 1
30405#define HAVE_BUILTIN___BUILTIN_BSWAP64 1
30406#define HAVE_BUILTIN___BUILTIN_POPCOUNT 1
30407#define HAVE_BUILTIN___BUILTIN_POPCOUNTLL 1
30408#define HAVE_BUILTIN___BUILTIN_CLZ 1
30409#define HAVE_BUILTIN___BUILTIN_CLZL 1
30410#define HAVE_BUILTIN___BUILTIN_CLZLL 1
30411#define HAVE_BUILTIN___BUILTIN_CTZ 1
30412#define HAVE_BUILTIN___BUILTIN_CTZLL 1
30413#define HAVE_BUILTIN___BUILTIN_ADD_OVERFLOW 1
30414#define HAVE_BUILTIN___BUILTIN_SUB_OVERFLOW 1
30415#define HAVE_BUILTIN___BUILTIN_MUL_OVERFLOW 1
30416#define HAVE_BUILTIN___BUILTIN_CONSTANT_P 1
30417#define HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR 1
30418#define HAVE_BUILTIN___BUILTIN_CHOOSE_EXPR_CONSTANT_P 1
30419#define HAVE_BUILTIN___BUILTIN_TYPES_COMPATIBLE_P 1
30420#define HAVE_BUILTIN___BUILTIN_TRAP 1
30421#define HAVE_GNU_QSORT_R 1
30422#define ATAN2_INF_C99 1
30423#define HAVE_CLOCK_GETRES 1
30424#define HAVE_LIBRT 1
30425#define HAVE_LIBRT 1
30426#define HAVE_TIMER_CREATE 1
30427#define HAVE_TIMER_SETTIME 1
30428#define HAVE_STRUCT_TM_TM_ZONE 1
30429#define HAVE_TM_ZONE 1
30430#define HAVE_STRUCT_TM_TM_GMTOFF 1
30431#define HAVE_DAYLIGHT 1
30432#define NEGATIVE_TIME_T 1
30433#define POSIX_SIGNAL 1
30434#define HAVE_SIG_T 1
30435#define RSHIFT(x,y) ((x)>>(int)(y))
30436#define HAVE__SC_CLK_TCK 1
30437#define STACK_GROW_DIRECTION -1
30438#define COROUTINE_H "coroutine/amd64/Context.h"
30439#define _REENTRANT 1
30440#define _THREAD_SAFE 1
30441#define HAVE_LIBPTHREAD 1
30442#define HAVE_SCHED_YIELD 1
30443#define HAVE_PTHREAD_ATTR_SETINHERITSCHED 1
30444#define HAVE_PTHREAD_ATTR_GETSTACK 1
30445#define HAVE_PTHREAD_ATTR_GETGUARDSIZE 1
30446#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
30447#define HAVE_PTHREAD_SIGMASK 1
30448#define HAVE_PTHREAD_SETNAME_NP 1
30449#define HAVE_PTHREAD_GETATTR_NP 1
30450#define SET_CURRENT_THREAD_NAME(name) pthread_setname_np(pthread_self(), name)
30451#define SET_ANOTHER_THREAD_NAME(thid,name) pthread_setname_np(thid, name)
30452#define DEFINE_MCONTEXT_PTR(mc,uc) mcontext_t *mc = &(uc)->uc_mcontext
30453#define HAVE_GETCONTEXT 1
30454#define HAVE_SETCONTEXT 1
30455#define USE_ELF 1
30456#define HAVE_ELF_H 1
30457#define HAVE_LIBZ 1
30458#define HAVE_BACKTRACE 1
30459#define HAVE_VALGRIND_MEMCHECK_H 1
30460#define DLEXT_MAXLEN 3
30461#define DLEXT ".so"
30462#define HAVE__SETJMP 1
30463#define RUBY_SETJMP(env) __builtin_setjmp((void **)(env))
30464#define RUBY_LONGJMP(env,val) __builtin_longjmp((void **)(env),val)
30465#define USE_MJIT 1
30466#define HAVE_PTHREAD_H 1
30467#define RUBY_PLATFORM "x86_64-linux"
30468#define RBIMPL_COMPILER_SINCE_H
30469#define RBIMPL_COMPILER_IS_H
30470#define RBIMPL_COMPILER_IS(cc) RBIMPL_COMPILER_IS_ ## cc
30471#define RBIMPL_COMPILER_IS_APPLE_H
30472#define RBIMPL_COMPILER_IS_Apple 0
30473#define RBIMPL_COMPILER_IS_CLANG_H
30474#define RBIMPL_COMPILER_IS_Clang 1
30475#define RBIMPL_COMPILER_VERSION_MAJOR __clang_major__
30476#define RBIMPL_COMPILER_VERSION_MINOR __clang_minor__
30477#define RBIMPL_COMPILER_VERSION_PATCH __clang_patchlevel__
30478#define RBIMPL_COMPILER_IS_GCC_H
30479#define RBIMPL_COMPILER_IS_INTEL_H
30480#define RBIMPL_COMPILER_IS_Intel 0
30481#define RBIMPL_COMPILER_IS_GCC 0
30482#define RBIMPL_COMPILER_IS_MSVC_H
30483#define RBIMPL_COMPILER_IS_MSVC 0
30484#define RBIMPL_COMPILER_IS_SUNPRO_H
30485#define RBIMPL_COMPILER_IS_SunPro 0
30486#define RBIMPL_COMPILER_SINCE(cc,x,y,z) (RBIMPL_COMPILER_IS(cc) && ((RBIMPL_COMPILER_VERSION_MAJOR > (x)) || ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && ((RBIMPL_COMPILER_VERSION_MINOR > (y)) || ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && (RBIMPL_COMPILER_VERSION_PATCH >= (z)))))))
30487#define RBIMPL_COMPILER_BEFORE(cc,x,y,z) (RBIMPL_COMPILER_IS(cc) && ((RBIMPL_COMPILER_VERSION_MAJOR < (x)) || ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && ((RBIMPL_COMPILER_VERSION_MINOR < (y)) || ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && (RBIMPL_COMPILER_VERSION_PATCH < (z)))))))
30488#define STRINGIZE(expr) STRINGIZE0(expr)
30489#define STRINGIZE0(expr) #expr
30490#define UNALIGNED_WORD_ACCESS 1
30491#define RBIMPL_TEST3(q,w,e,...) e
30492#define RBIMPL_TEST2(...) RBIMPL_TEST3(__VA_OPT__(,),1,0,0)
30493#define RBIMPL_TEST1() RBIMPL_TEST2("ruby")
30494#undef HAVE___VA_OPT__
30495#undef RBIMPL_TEST1
30496#undef RBIMPL_TEST2
30497#undef RBIMPL_TEST3
30498#define __STDARG_H
30499#define _VA_LIST
30500#define va_start(ap,param) __builtin_va_start(ap, param)
30501#define va_end(ap) __builtin_va_end(ap)
30502#define va_arg(ap,type) __builtin_va_arg(ap, type)
30503#define __va_copy(d,s) __builtin_va_copy(d,s)
30504#define va_copy(dest,src) __builtin_va_copy(dest, src)
30505#define __GNUC_VA_LIST 1
30506#define RUBY_DEFINES_H 1
30507#define _STDIO_H 1
30508#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
30509#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
30510#define _FEATURES_H 1
30511#undef __USE_ISOC11
30512#undef __USE_ISOC99
30513#undef __USE_ISOC95
30514#undef __USE_ISOCXX11
30515#undef __USE_POSIX
30516#undef __USE_POSIX2
30517#undef __USE_POSIX199309
30518#undef __USE_POSIX199506
30519#undef __USE_XOPEN
30520#undef __USE_XOPEN_EXTENDED
30521#undef __USE_UNIX98
30522#undef __USE_XOPEN2K
30523#undef __USE_XOPEN2KXSI
30524#undef __USE_XOPEN2K8
30525#undef __USE_XOPEN2K8XSI
30526#undef __USE_LARGEFILE
30527#undef __USE_LARGEFILE64
30528#undef __USE_FILE_OFFSET64
30529#undef __USE_MISC
30530#undef __USE_ATFILE
30531#undef __USE_GNU
30532#undef __USE_FORTIFY_LEVEL
30533#undef __KERNEL_STRICT_NAMES
30534#undef __GLIBC_USE_ISOC2X
30535#undef __GLIBC_USE_DEPRECATED_GETS
30536#undef __GLIBC_USE_DEPRECATED_SCANF
30537#define __KERNEL_STRICT_NAMES
30538#define __GNUC_PREREQ(maj,min) ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
30539#define __glibc_clang_prereq(maj,min) ((__clang_major__ << 16) + __clang_minor__ >= ((maj) << 16) + (min))
30540#define __GLIBC_USE(F) __GLIBC_USE_ ## F
30541#undef _ISOC95_SOURCE
30542#define _ISOC95_SOURCE 1
30543#undef _ISOC99_SOURCE
30544#define _ISOC99_SOURCE 1
30545#undef _ISOC11_SOURCE
30546#define _ISOC11_SOURCE 1
30547#undef _ISOC2X_SOURCE
30548#define _ISOC2X_SOURCE 1
30549#undef _POSIX_SOURCE
30550#define _POSIX_SOURCE 1
30551#undef _POSIX_C_SOURCE
30552#define _POSIX_C_SOURCE 200809L
30553#undef _XOPEN_SOURCE
30554#define _XOPEN_SOURCE 700
30555#undef _XOPEN_SOURCE_EXTENDED
30556#define _XOPEN_SOURCE_EXTENDED 1
30557#undef _LARGEFILE64_SOURCE
30558#define _LARGEFILE64_SOURCE 1
30559#undef _DEFAULT_SOURCE
30560#define _DEFAULT_SOURCE 1
30561#undef _ATFILE_SOURCE
30562#define _ATFILE_SOURCE 1
30563#undef _DEFAULT_SOURCE
30564#define _DEFAULT_SOURCE 1
30565#define __GLIBC_USE_ISOC2X 1
30566#define __USE_ISOC11 1
30567#define __USE_ISOC99 1
30568#define __USE_ISOC95 1
30569#undef _POSIX_SOURCE
30570#define _POSIX_SOURCE 1
30571#undef _POSIX_C_SOURCE
30572#define _POSIX_C_SOURCE 200809L
30573#define __USE_POSIX 1
30574#define __USE_POSIX2 1
30575#define __USE_POSIX199309 1
30576#define __USE_POSIX199506 1
30577#define __USE_XOPEN2K 1
30578#undef __USE_ISOC95
30579#define __USE_ISOC95 1
30580#undef __USE_ISOC99
30581#define __USE_ISOC99 1
30582#define __USE_XOPEN2K8 1
30583#undef _ATFILE_SOURCE
30584#define _ATFILE_SOURCE 1
30585#define __USE_XOPEN 1
30586#define __USE_XOPEN_EXTENDED 1
30587#define __USE_UNIX98 1
30588#undef _LARGEFILE_SOURCE
30589#define _LARGEFILE_SOURCE 1
30590#define __USE_XOPEN2K8 1
30591#define __USE_XOPEN2K8XSI 1
30592#define __USE_XOPEN2K 1
30593#define __USE_XOPEN2KXSI 1
30594#undef __USE_ISOC95
30595#define __USE_ISOC95 1
30596#undef __USE_ISOC99
30597#define __USE_ISOC99 1
30598#define __USE_LARGEFILE 1
30599#define __USE_LARGEFILE64 1
30600#define __USE_MISC 1
30601#define __USE_ATFILE 1
30602#define __USE_GNU 1
30603#define __USE_FORTIFY_LEVEL 2
30604#define __GLIBC_USE_DEPRECATED_GETS 0
30605#define __GLIBC_USE_DEPRECATED_SCANF 0
30606#define _STDC_PREDEF_H 1
30607#define __STDC_IEC_559__ 1
30608#define __STDC_IEC_559_COMPLEX__ 1
30609#define __STDC_ISO_10646__ 201706L
30610#undef __GNU_LIBRARY__
30611#define __GNU_LIBRARY__ 6
30612#define __GLIBC__ 2
30613#define __GLIBC_MINOR__ 31
30614#define __GLIBC_PREREQ(maj,min) ((__GLIBC__ << 16) + __GLIBC_MINOR__ >= ((maj) << 16) + (min))
30615#define _SYS_CDEFS_H 1
30616#undef __P
30617#undef __PMT
30618#define __LEAF
30619#define __LEAF_ATTR
30620#define __THROW __attribute__ ((__nothrow__ __LEAF))
30621#define __THROWNL __attribute__ ((__nothrow__))
30622#define __NTH(fct) __attribute__ ((__nothrow__ __LEAF)) fct
30623#define __NTHNL(fct) __attribute__ ((__nothrow__)) fct
30624#define __glibc_clang_has_extension(ext) __has_extension (ext)
30625#define __P(args) args
30626#define __PMT(args) args
30627#define __CONCAT(x,y) x ## y
30628#define __STRING(x) #x
30629#define __ptr_t void *
30630#define __BEGIN_DECLS
30631#define __END_DECLS
30632#define __bos(ptr) __builtin_object_size (ptr, __USE_FORTIFY_LEVEL > 1)
30633#define __bos0(ptr) __builtin_object_size (ptr, 0)
30634#define __warndecl(name,msg) extern void name (void)
30635#define __warnattr(msg)
30636#define __errordecl(name,msg) extern void name (void)
30637#define __flexarr []
30638#define __glibc_c99_flexarr_available 1
30639#define __REDIRECT(name,proto,alias) name proto __asm__ (__ASMNAME (#alias))
30640#define __REDIRECT_NTH(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROW
30641#define __REDIRECT_NTHNL(name,proto,alias) name proto __asm__ (__ASMNAME (#alias)) __THROWNL
30642#define __ASMNAME(cname) __ASMNAME2 (__USER_LABEL_PREFIX__, cname)
30643#define __ASMNAME2(prefix,cname) __STRING (prefix) cname
30644#define __attribute_malloc__ __attribute__ ((__malloc__))
30645#define __attribute_alloc_size__(params)
30646#define __attribute_pure__ __attribute__ ((__pure__))
30647#define __attribute_const__ __attribute__ ((__const__))
30648#define __attribute_used__ __attribute__ ((__used__))
30649#define __attribute_noinline__ __attribute__ ((__noinline__))
30650#define __attribute_deprecated__ __attribute__ ((__deprecated__))
30651#define __attribute_deprecated_msg__(msg) __attribute__ ((__deprecated__ (msg)))
30652#define __attribute_format_arg__(x) __attribute__ ((__format_arg__ (x)))
30653#define __attribute_format_strfmon__(a,b) __attribute__ ((__format__ (__strfmon__, a, b)))
30654#define __nonnull(params) __attribute__ ((__nonnull__ params))
30655#define __attribute_warn_unused_result__ __attribute__ ((__warn_unused_result__))
30656#define __wur __attribute_warn_unused_result__
30657#undef __always_inline
30658#define __always_inline __inline __attribute__ ((__always_inline__))
30659#define __attribute_artificial__
30660#define __extern_inline extern __inline __attribute__ ((__gnu_inline__))
30661#define __extern_always_inline extern __always_inline __attribute__ ((__gnu_inline__))
30662#define __fortify_function __extern_always_inline __attribute_artificial__
30663#define __restrict_arr __restrict
30664#define __glibc_unlikely(cond) __builtin_expect ((cond), 0)
30665#define __glibc_likely(cond) __builtin_expect ((cond), 1)
30666#define __glibc_has_attribute(attr) __has_attribute (attr)
30667#define _Noreturn __attribute__ ((__noreturn__))
30668#define __attribute_nonstring__
30669#undef __attribute_copy__
30670#define __attribute_copy__(arg)
30671#define _Static_assert(expr,diagnostic) extern int (*__Static_assert_function (void)) [!!sizeof (struct { int __error_if_negative: (expr) ? 2 : -1; })]
30672#define __WORDSIZE 64
30673#define __WORDSIZE_TIME64_COMPAT32 1
30674#define __SYSCALL_WORDSIZE 64
30675#define __LONG_DOUBLE_USES_FLOAT128 0
30676#define __LDBL_REDIR1(name,proto,alias) name proto
30677#define __LDBL_REDIR(name,proto) name proto
30678#define __LDBL_REDIR1_NTH(name,proto,alias) name proto __THROW
30679#define __LDBL_REDIR_NTH(name,proto) name proto __THROW
30680#define __LDBL_REDIR_DECL(name)
30681#define __REDIRECT_LDBL(name,proto,alias) __REDIRECT (name, proto, alias)
30682#define __REDIRECT_NTH_LDBL(name,proto,alias) __REDIRECT_NTH (name, proto, alias)
30683#define __glibc_macro_warning1(message) _Pragma (#message)
30684#define __glibc_macro_warning(message) __glibc_macro_warning1 (GCC warning message)
30685#define __HAVE_GENERIC_SELECTION 1
30686#define __USE_EXTERN_INLINES 1
30687#define __stub___compat_bdflush
30688#define __stub_chflags
30689#define __stub_fchflags
30690#define __stub_gtty
30691#define __stub_lchmod
30692#define __stub_revoke
30693#define __stub_setlogin
30694#define __stub_sigreturn
30695#define __stub_sstk
30696#define __stub_stty
30697#undef __GLIBC_USE_LIB_EXT2
30698#define __GLIBC_USE_LIB_EXT2 1
30699#undef __GLIBC_USE_IEC_60559_BFP_EXT
30700#define __GLIBC_USE_IEC_60559_BFP_EXT 1
30701#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
30702#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
30703#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
30704#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
30705#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
30706#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
30707#undef __GLIBC_USE_IEC_60559_TYPES_EXT
30708#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
30709#define __need_size_t
30710#define __need_NULL
30711#define _SIZE_T
30712#undef __need_size_t
30713#undef NULL
30714#define NULL ((void*)0)
30715#undef __need_NULL
30716#define __need___va_list
30717#define _BITS_TYPES_H 1
30718#define __WORDSIZE 64
30719#define __WORDSIZE_TIME64_COMPAT32 1
30720#define __SYSCALL_WORDSIZE 64
30721#define __TIMESIZE __WORDSIZE
30722#define __S16_TYPE short int
30723#define __U16_TYPE unsigned short int
30724#define __S32_TYPE int
30725#define __U32_TYPE unsigned int
30726#define __SLONGWORD_TYPE long int
30727#define __ULONGWORD_TYPE unsigned long int
30728#define __SQUAD_TYPE long int
30729#define __UQUAD_TYPE unsigned long int
30730#define __SWORD_TYPE long int
30731#define __UWORD_TYPE unsigned long int
30732#define __SLONG32_TYPE int
30733#define __ULONG32_TYPE unsigned int
30734#define __S64_TYPE long int
30735#define __U64_TYPE unsigned long int
30736#define __STD_TYPE typedef
30737#define _BITS_TYPESIZES_H 1
30738#define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
30739#define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
30740#define __DEV_T_TYPE __UQUAD_TYPE
30741#define __UID_T_TYPE __U32_TYPE
30742#define __GID_T_TYPE __U32_TYPE
30743#define __INO_T_TYPE __SYSCALL_ULONG_TYPE
30744#define __INO64_T_TYPE __UQUAD_TYPE
30745#define __MODE_T_TYPE __U32_TYPE
30746#define __NLINK_T_TYPE __SYSCALL_ULONG_TYPE
30747#define __FSWORD_T_TYPE __SYSCALL_SLONG_TYPE
30748#define __OFF_T_TYPE __SYSCALL_SLONG_TYPE
30749#define __OFF64_T_TYPE __SQUAD_TYPE
30750#define __PID_T_TYPE __S32_TYPE
30751#define __RLIM_T_TYPE __SYSCALL_ULONG_TYPE
30752#define __RLIM64_T_TYPE __UQUAD_TYPE
30753#define __BLKCNT_T_TYPE __SYSCALL_SLONG_TYPE
30754#define __BLKCNT64_T_TYPE __SQUAD_TYPE
30755#define __FSBLKCNT_T_TYPE __SYSCALL_ULONG_TYPE
30756#define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
30757#define __FSFILCNT_T_TYPE __SYSCALL_ULONG_TYPE
30758#define __FSFILCNT64_T_TYPE __UQUAD_TYPE
30759#define __ID_T_TYPE __U32_TYPE
30760#define __CLOCK_T_TYPE __SYSCALL_SLONG_TYPE
30761#define __TIME_T_TYPE __SYSCALL_SLONG_TYPE
30762#define __USECONDS_T_TYPE __U32_TYPE
30763#define __SUSECONDS_T_TYPE __SYSCALL_SLONG_TYPE
30764#define __DADDR_T_TYPE __S32_TYPE
30765#define __KEY_T_TYPE __S32_TYPE
30766#define __CLOCKID_T_TYPE __S32_TYPE
30767#define __TIMER_T_TYPE void *
30768#define __BLKSIZE_T_TYPE __SYSCALL_SLONG_TYPE
30769#define __FSID_T_TYPE struct { int __val[2]; }
30770#define __SSIZE_T_TYPE __SWORD_TYPE
30771#define __CPU_MASK_TYPE __SYSCALL_ULONG_TYPE
30772#define __OFF_T_MATCHES_OFF64_T 1
30773#define __INO_T_MATCHES_INO64_T 1
30774#define __RLIM_T_MATCHES_RLIM64_T 1
30775#define __STATFS_MATCHES_STATFS64 1
30776#define __FD_SETSIZE 1024
30777#define _BITS_TIME64_H 1
30778#define __TIME64_T_TYPE __TIME_T_TYPE
30779#undef __STD_TYPE
30780#define _____fpos_t_defined 1
30781#define ____mbstate_t_defined 1
30782#define _____fpos64_t_defined 1
30783#define ____FILE_defined 1
30784#define __FILE_defined 1
30785#define __struct_FILE_defined 1
30786#define __getc_unlocked_body(_fp) (__glibc_unlikely ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end) ? __uflow (_fp) : *(unsigned char *) (_fp)->_IO_read_ptr++)
30787#define __putc_unlocked_body(_ch,_fp) (__glibc_unlikely ((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end) ? __overflow (_fp, (unsigned char) (_ch)) : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch)))
30788#define _IO_EOF_SEEN 0x0010
30789#define __feof_unlocked_body(_fp) (((_fp)->_flags & _IO_EOF_SEEN) != 0)
30790#define _IO_ERR_SEEN 0x0020
30791#define __ferror_unlocked_body(_fp) (((_fp)->_flags & _IO_ERR_SEEN) != 0)
30792#define _IO_USER_LOCK 0x8000
30793#define __cookie_io_functions_t_defined 1
30794#define _VA_LIST_DEFINED
30795#define __off_t_defined
30796#define __off64_t_defined
30797#define __ssize_t_defined
30798#define _IOFBF 0
30799#define _IOLBF 1
30800#define _IONBF 2
30801#define BUFSIZ 8192
30802#define EOF (-1)
30803#define SEEK_SET 0
30804#define SEEK_CUR 1
30805#define SEEK_END 2
30806#define SEEK_DATA 3
30807#define SEEK_HOLE 4
30808#define P_tmpdir "/tmp"
30809#define _BITS_STDIO_LIM_H 1
30810#define L_tmpnam 20
30811#define TMP_MAX 238328
30812#define FILENAME_MAX 4096
30813#define L_ctermid 9
30814#define L_cuserid 9
30815#undef FOPEN_MAX
30816#define FOPEN_MAX 16
30817#define stdin stdin
30818#define stdout stdout
30819#define stderr stderr
30820#define RENAME_NOREPLACE (1 << 0)
30821#define RENAME_EXCHANGE (1 << 1)
30822#define RENAME_WHITEOUT (1 << 2)
30823#define _BITS_STDIO_H 1
30824#define __STDIO_INLINE __extern_inline
30825#define fread_unlocked(ptr,size,n,stream) (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) && (size_t) (size) * (size_t) (n) <= 8 && (size_t) (size) != 0) ? ({ char *__ptr = (char *) (ptr); FILE *__stream = (stream); size_t __cnt; for (__cnt = (size_t) (size) * (size_t) (n); __cnt > 0; --__cnt) { int __c = getc_unlocked (__stream); if (__c == EOF) break; *__ptr++ = __c; } ((size_t) (size) * (size_t) (n) - __cnt) / (size_t) (size); }) : (((__builtin_constant_p (size) && (size_t) (size) == 0) || (__builtin_constant_p (n) && (size_t) (n) == 0)) ? ((void) (ptr), (void) (stream), (void) (size), (void) (n), (size_t) 0) : fread_unlocked (ptr, size, n, stream))))
30826#define fwrite_unlocked(ptr,size,n,stream) (__extension__ ((__builtin_constant_p (size) && __builtin_constant_p (n) && (size_t) (size) * (size_t) (n) <= 8 && (size_t) (size) != 0) ? ({ const char *__ptr = (const char *) (ptr); FILE *__stream = (stream); size_t __cnt; for (__cnt = (size_t) (size) * (size_t) (n); __cnt > 0; --__cnt) if (putc_unlocked (*__ptr++, __stream) == EOF) break; ((size_t) (size) * (size_t) (n) - __cnt) / (size_t) (size); }) : (((__builtin_constant_p (size) && (size_t) (size) == 0) || (__builtin_constant_p (n) && (size_t) (n) == 0)) ? ((void) (ptr), (void) (stream), (void) (size), (void) (n), (size_t) 0) : fwrite_unlocked (ptr, size, n, stream))))
30827#undef __STDIO_INLINE
30828#define _BITS_STDIO2_H 1
30829#define sprintf(str,...) __builtin___sprintf_chk (str, __USE_FORTIFY_LEVEL - 1, __bos (str), __VA_ARGS__)
30830#define snprintf(str,len,...) __builtin___snprintf_chk (str, len, __USE_FORTIFY_LEVEL - 1, __bos (str), __VA_ARGS__)
30831#define printf(...) __printf_chk (__USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
30832#define fprintf(stream,...) __fprintf_chk (stream, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
30833#define dprintf(fd,...) __dprintf_chk (fd, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
30834#define asprintf(ptr,...) __asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
30835#define __asprintf(ptr,...) __asprintf_chk (ptr, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
30836#define obstack_printf(obstack,...) __obstack_printf_chk (obstack, __USE_FORTIFY_LEVEL - 1, __VA_ARGS__)
30837#undef fread_unlocked
30838#define _SYS_TYPES_H 1
30839#define __u_char_defined
30840#define __ino_t_defined
30841#define __ino64_t_defined
30842#define __dev_t_defined
30843#define __gid_t_defined
30844#define __mode_t_defined
30845#define __nlink_t_defined
30846#define __uid_t_defined
30847#define __pid_t_defined
30848#define __id_t_defined
30849#define __daddr_t_defined
30850#define __key_t_defined
30851#define __clock_t_defined 1
30852#define __clockid_t_defined 1
30853#define __time_t_defined 1
30854#define __timer_t_defined 1
30855#define __useconds_t_defined
30856#define __suseconds_t_defined
30857#define __need_size_t
30858#undef __need_size_t
30859#define _BITS_STDINT_INTN_H 1
30860#define __BIT_TYPES_DEFINED__ 1
30861#define _ENDIAN_H 1
30862#define _BITS_ENDIAN_H 1
30863#define __LITTLE_ENDIAN 1234
30864#define __BIG_ENDIAN 4321
30865#define __PDP_ENDIAN 3412
30866#define _BITS_ENDIANNESS_H 1
30867#define __BYTE_ORDER __LITTLE_ENDIAN
30868#define __FLOAT_WORD_ORDER __BYTE_ORDER
30869#define __LONG_LONG_PAIR(HI,LO) LO, HI
30870#define LITTLE_ENDIAN __LITTLE_ENDIAN
30871#define BIG_ENDIAN __BIG_ENDIAN
30872#define PDP_ENDIAN __PDP_ENDIAN
30873#define BYTE_ORDER __BYTE_ORDER
30874#define _BITS_BYTESWAP_H 1
30875#define __bswap_constant_16(x) ((__uint16_t) ((((x) >> 8) & 0xff) | (((x) & 0xff) << 8)))
30876#define __bswap_constant_32(x) ((((x) & 0xff000000u) >> 24) | (((x) & 0x00ff0000u) >> 8) | (((x) & 0x0000ff00u) << 8) | (((x) & 0x000000ffu) << 24))
30877#define __bswap_constant_64(x) ((((x) & 0xff00000000000000ull) >> 56) | (((x) & 0x00ff000000000000ull) >> 40) | (((x) & 0x0000ff0000000000ull) >> 24) | (((x) & 0x000000ff00000000ull) >> 8) | (((x) & 0x00000000ff000000ull) << 8) | (((x) & 0x0000000000ff0000ull) << 24) | (((x) & 0x000000000000ff00ull) << 40) | (((x) & 0x00000000000000ffull) << 56))
30878#define _BITS_UINTN_IDENTITY_H 1
30879#define htobe16(x) __bswap_16 (x)
30880#define htole16(x) __uint16_identity (x)
30881#define be16toh(x) __bswap_16 (x)
30882#define le16toh(x) __uint16_identity (x)
30883#define htobe32(x) __bswap_32 (x)
30884#define htole32(x) __uint32_identity (x)
30885#define be32toh(x) __bswap_32 (x)
30886#define le32toh(x) __uint32_identity (x)
30887#define htobe64(x) __bswap_64 (x)
30888#define htole64(x) __uint64_identity (x)
30889#define be64toh(x) __bswap_64 (x)
30890#define le64toh(x) __uint64_identity (x)
30891#define _SYS_SELECT_H 1
30892#define __WORDSIZE 64
30893#define __WORDSIZE_TIME64_COMPAT32 1
30894#define __SYSCALL_WORDSIZE 64
30895#define __FD_ZERO_STOS "stosq"
30896#define __FD_ZERO(fdsp) do { int __d0, __d1; __asm__ __volatile__ ("cld; rep; " __FD_ZERO_STOS : "=c" (__d0), "=D" (__d1) : "a" (0), "0" (sizeof (fd_set) / sizeof (__fd_mask)), "1" (&__FDS_BITS (fdsp)[0]) : "memory"); } while (0)
30897#define __FD_SET(d,set) ((void) (__FDS_BITS (set)[__FD_ELT (d)] |= __FD_MASK (d)))
30898#define __FD_CLR(d,set) ((void) (__FDS_BITS (set)[__FD_ELT (d)] &= ~__FD_MASK (d)))
30899#define __FD_ISSET(d,set) ((__FDS_BITS (set)[__FD_ELT (d)] & __FD_MASK (d)) != 0)
30900#define __sigset_t_defined 1
30901#define ____sigset_t_defined
30902#define _SIGSET_NWORDS (1024 / (8 * sizeof (unsigned long int)))
30903#define __timeval_defined 1
30904#define _STRUCT_TIMESPEC 1
30905#undef __NFDBITS
30906#define __NFDBITS (8 * (int) sizeof (__fd_mask))
30907#define __FD_ELT(d) ((d) / __NFDBITS)
30908#define __FD_MASK(d) ((__fd_mask) (1UL << ((d) % __NFDBITS)))
30909#define __FDS_BITS(set) ((set)->fds_bits)
30910#define FD_SETSIZE __FD_SETSIZE
30911#define NFDBITS __NFDBITS
30912#define FD_SET(fd,fdsetp) __FD_SET (fd, fdsetp)
30913#define FD_CLR(fd,fdsetp) __FD_CLR (fd, fdsetp)
30914#define FD_ISSET(fd,fdsetp) __FD_ISSET (fd, fdsetp)
30915#define FD_ZERO(fdsetp) __FD_ZERO (fdsetp)
30916#undef __FD_ELT
30917#define __FD_ELT(d) __extension__ ({ long int __d = (d); (__builtin_constant_p (__d) ? (0 <= __d && __d < __FD_SETSIZE ? (__d / __NFDBITS) : __fdelt_warn (__d)) : __fdelt_chk (__d)); })
30918#define __blksize_t_defined
30919#define __blkcnt_t_defined
30920#define __fsblkcnt_t_defined
30921#define __fsfilcnt_t_defined
30922#define _BITS_PTHREADTYPES_COMMON_H 1
30923#define _THREAD_SHARED_TYPES_H 1
30924#define _BITS_PTHREADTYPES_ARCH_H 1
30925#define __WORDSIZE 64
30926#define __WORDSIZE_TIME64_COMPAT32 1
30927#define __SYSCALL_WORDSIZE 64
30928#define __SIZEOF_PTHREAD_MUTEX_T 40
30929#define __SIZEOF_PTHREAD_ATTR_T 56
30930#define __SIZEOF_PTHREAD_RWLOCK_T 56
30931#define __SIZEOF_PTHREAD_BARRIER_T 32
30932#define __SIZEOF_PTHREAD_MUTEXATTR_T 4
30933#define __SIZEOF_PTHREAD_COND_T 48
30934#define __SIZEOF_PTHREAD_CONDATTR_T 4
30935#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8
30936#define __SIZEOF_PTHREAD_BARRIERATTR_T 4
30937#define __LOCK_ALIGNMENT
30938#define __ONCE_ALIGNMENT
30939#define _THREAD_MUTEX_INTERNAL_H 1
30940#define __PTHREAD_MUTEX_HAVE_PREV 1
30941#define __PTHREAD_MUTEX_INITIALIZER(__kind) 0, 0, 0, 0, __kind, 0, 0, { 0, 0 }
30942#define _RWLOCK_INTERNAL_H
30943#define __PTHREAD_RWLOCK_ELISION_EXTRA 0, { 0, 0, 0, 0, 0, 0, 0 }
30944#define __PTHREAD_RWLOCK_INITIALIZER(__flags) 0, 0, 0, 0, 0, 0, 0, 0, __PTHREAD_RWLOCK_ELISION_EXTRA, 0, __flags
30945#define __have_pthread_attr_t 1
30946#define _SYS_STAT_H 1
30947#define _BITS_STAT_H 1
30948#define _STAT_VER_KERNEL 0
30949#define _STAT_VER_LINUX 1
30950#define _MKNOD_VER_LINUX 0
30951#define _STAT_VER _STAT_VER_LINUX
30952#define st_atime st_atim.tv_sec
30953#define st_mtime st_mtim.tv_sec
30954#define st_ctime st_ctim.tv_sec
30955#define _STATBUF_ST_BLKSIZE
30956#define _STATBUF_ST_RDEV
30957#define _STATBUF_ST_NSEC
30958#define __S_IFMT 0170000
30959#define __S_IFDIR 0040000
30960#define __S_IFCHR 0020000
30961#define __S_IFBLK 0060000
30962#define __S_IFREG 0100000
30963#define __S_IFIFO 0010000
30964#define __S_IFLNK 0120000
30965#define __S_IFSOCK 0140000
30966#define __S_TYPEISMQ(buf) ((buf)->st_mode - (buf)->st_mode)
30967#define __S_TYPEISSEM(buf) ((buf)->st_mode - (buf)->st_mode)
30968#define __S_TYPEISSHM(buf) ((buf)->st_mode - (buf)->st_mode)
30969#define __S_ISUID 04000
30970#define __S_ISGID 02000
30971#define __S_ISVTX 01000
30972#define __S_IREAD 0400
30973#define __S_IWRITE 0200
30974#define __S_IEXEC 0100
30975#define UTIME_NOW ((1l << 30) - 1l)
30976#define UTIME_OMIT ((1l << 30) - 2l)
30977#define S_IFMT __S_IFMT
30978#define S_IFDIR __S_IFDIR
30979#define S_IFCHR __S_IFCHR
30980#define S_IFBLK __S_IFBLK
30981#define S_IFREG __S_IFREG
30982#define S_IFIFO __S_IFIFO
30983#define S_IFLNK __S_IFLNK
30984#define S_IFSOCK __S_IFSOCK
30985#define __S_ISTYPE(mode,mask) (((mode) & __S_IFMT) == (mask))
30986#define S_ISDIR(mode) __S_ISTYPE((mode), __S_IFDIR)
30987#define S_ISCHR(mode) __S_ISTYPE((mode), __S_IFCHR)
30988#define S_ISBLK(mode) __S_ISTYPE((mode), __S_IFBLK)
30989#define S_ISREG(mode) __S_ISTYPE((mode), __S_IFREG)
30990#define S_ISFIFO(mode) __S_ISTYPE((mode), __S_IFIFO)
30991#define S_ISLNK(mode) __S_ISTYPE((mode), __S_IFLNK)
30992#define S_ISSOCK(mode) __S_ISTYPE((mode), __S_IFSOCK)
30993#define S_TYPEISMQ(buf) __S_TYPEISMQ(buf)
30994#define S_TYPEISSEM(buf) __S_TYPEISSEM(buf)
30995#define S_TYPEISSHM(buf) __S_TYPEISSHM(buf)
30996#define S_ISUID __S_ISUID
30997#define S_ISGID __S_ISGID
30998#define S_ISVTX __S_ISVTX
30999#define S_IRUSR __S_IREAD
31000#define S_IWUSR __S_IWRITE
31001#define S_IXUSR __S_IEXEC
31002#define S_IRWXU (__S_IREAD|__S_IWRITE|__S_IEXEC)
31003#define S_IREAD S_IRUSR
31004#define S_IWRITE S_IWUSR
31005#define S_IEXEC S_IXUSR
31006#define S_IRGRP (S_IRUSR >> 3)
31007#define S_IWGRP (S_IWUSR >> 3)
31008#define S_IXGRP (S_IXUSR >> 3)
31009#define S_IRWXG (S_IRWXU >> 3)
31010#define S_IROTH (S_IRGRP >> 3)
31011#define S_IWOTH (S_IWGRP >> 3)
31012#define S_IXOTH (S_IXGRP >> 3)
31013#define S_IRWXO (S_IRWXG >> 3)
31014#define ACCESSPERMS (S_IRWXU|S_IRWXG|S_IRWXO)
31015#define ALLPERMS (S_ISUID|S_ISGID|S_ISVTX|S_IRWXU|S_IRWXG|S_IRWXO)
31016#define DEFFILEMODE (S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)
31017#define S_BLKSIZE 512
31018#define _MKNOD_VER 0
31019#define _LINUX_STAT_H
31020#define _LINUX_TYPES_H
31021#define _ASM_GENERIC_TYPES_H
31022#define _ASM_GENERIC_INT_LL64_H
31023#define __ASM_X86_BITSPERLONG_H
31024#define __BITS_PER_LONG 64
31025#define __ASM_GENERIC_BITS_PER_LONG
31026#define _LINUX_POSIX_TYPES_H
31027#undef __FD_SETSIZE
31028#define __FD_SETSIZE 1024
31029#define _ASM_X86_POSIX_TYPES_64_H
31030#define __kernel_old_uid_t __kernel_old_uid_t
31031#define __kernel_old_dev_t __kernel_old_dev_t
31032#define __ASM_GENERIC_POSIX_TYPES_H
31033#define __bitwise__
31034#define __bitwise __bitwise__
31035#define __aligned_u64 __u64 __attribute__((aligned(8)))
31036#define __aligned_be64 __be64 __attribute__((aligned(8)))
31037#define __aligned_le64 __le64 __attribute__((aligned(8)))
31038#define STATX_TYPE 0x00000001U
31039#define STATX_MODE 0x00000002U
31040#define STATX_NLINK 0x00000004U
31041#define STATX_UID 0x00000008U
31042#define STATX_GID 0x00000010U
31043#define STATX_ATIME 0x00000020U
31044#define STATX_MTIME 0x00000040U
31045#define STATX_CTIME 0x00000080U
31046#define STATX_INO 0x00000100U
31047#define STATX_SIZE 0x00000200U
31048#define STATX_BLOCKS 0x00000400U
31049#define STATX_BASIC_STATS 0x000007ffU
31050#define STATX_BTIME 0x00000800U
31051#define STATX_ALL 0x00000fffU
31052#define STATX__RESERVED 0x80000000U
31053#define STATX_ATTR_COMPRESSED 0x00000004
31054#define STATX_ATTR_IMMUTABLE 0x00000010
31055#define STATX_ATTR_APPEND 0x00000020
31056#define STATX_ATTR_NODUMP 0x00000040
31057#define STATX_ATTR_ENCRYPTED 0x00000800
31058#define STATX_ATTR_AUTOMOUNT 0x00001000
31059#define STATX_ATTR_VERITY 0x00100000
31060#define __statx_timestamp_defined 1
31061#define __statx_defined 1
31062#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
31063#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
31064#undef __GLIBC_USE_LIB_EXT2
31065#define __GLIBC_USE_LIB_EXT2 1
31066#undef __GLIBC_USE_IEC_60559_BFP_EXT
31067#define __GLIBC_USE_IEC_60559_BFP_EXT 1
31068#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
31069#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
31070#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
31071#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
31072#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
31073#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
31074#undef __GLIBC_USE_IEC_60559_TYPES_EXT
31075#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
31076#define __need_size_t
31077#define __need_wchar_t
31078#define __need_NULL
31079#undef __need_size_t
31080#define _WCHAR_T
31081#undef __need_wchar_t
31082#undef NULL
31083#define NULL ((void*)0)
31084#undef __need_NULL
31085#define _STDLIB_H 1
31086#define WNOHANG 1
31087#define WUNTRACED 2
31088#define WSTOPPED 2
31089#define WEXITED 4
31090#define WCONTINUED 8
31091#define WNOWAIT 0x01000000
31092#define __WNOTHREAD 0x20000000
31093#define __WALL 0x40000000
31094#define __WCLONE 0x80000000
31095#define __WEXITSTATUS(status) (((status) & 0xff00) >> 8)
31096#define __WTERMSIG(status) ((status) & 0x7f)
31097#define __WSTOPSIG(status) __WEXITSTATUS(status)
31098#define __WIFEXITED(status) (__WTERMSIG(status) == 0)
31099#define __WIFSIGNALED(status) (((signed char) (((status) & 0x7f) + 1) >> 1) > 0)
31100#define __WIFSTOPPED(status) (((status) & 0xff) == 0x7f)
31101#define __WIFCONTINUED(status) ((status) == __W_CONTINUED)
31102#define __WCOREDUMP(status) ((status) & __WCOREFLAG)
31103#define __W_EXITCODE(ret,sig) ((ret) << 8 | (sig))
31104#define __W_STOPCODE(sig) ((sig) << 8 | 0x7f)
31105#define __W_CONTINUED 0xffff
31106#define __WCOREFLAG 0x80
31107#define WEXITSTATUS(status) __WEXITSTATUS (status)
31108#define WTERMSIG(status) __WTERMSIG (status)
31109#define WSTOPSIG(status) __WSTOPSIG (status)
31110#define WIFEXITED(status) __WIFEXITED (status)
31111#define WIFSIGNALED(status) __WIFSIGNALED (status)
31112#define WIFSTOPPED(status) __WIFSTOPPED (status)
31113#define WIFCONTINUED(status) __WIFCONTINUED (status)
31114#define _BITS_FLOATN_H
31115#define __HAVE_FLOAT128 0
31116#define __HAVE_DISTINCT_FLOAT128 0
31117#define __HAVE_FLOAT64X 1
31118#define __HAVE_FLOAT64X_LONG_DOUBLE 1
31119#define _BITS_FLOATN_COMMON_H
31120#define __LONG_DOUBLE_USES_FLOAT128 0
31121#define __HAVE_FLOAT16 0
31122#define __HAVE_FLOAT32 1
31123#define __HAVE_FLOAT64 1
31124#define __HAVE_FLOAT32X 1
31125#define __HAVE_FLOAT128X 0
31126#define __HAVE_DISTINCT_FLOAT16 __HAVE_FLOAT16
31127#define __HAVE_DISTINCT_FLOAT32 0
31128#define __HAVE_DISTINCT_FLOAT64 0
31129#define __HAVE_DISTINCT_FLOAT32X 0
31130#define __HAVE_DISTINCT_FLOAT64X 0
31131#define __HAVE_DISTINCT_FLOAT128X __HAVE_FLOAT128X
31132#define __HAVE_FLOAT128_UNLIKE_LDBL (__HAVE_DISTINCT_FLOAT128 && __LDBL_MANT_DIG__ != 113)
31133#define __HAVE_FLOATN_NOT_TYPEDEF 0
31134#define __f32(x) x##f
31135#define __f64(x) x
31136#define __f32x(x) x
31137#define __f64x(x) x##l
31138#define __CFLOAT32 _Complex float
31139#define __CFLOAT64 _Complex double
31140#define __CFLOAT32X _Complex double
31141#define __CFLOAT64X _Complex long double
31142#define __builtin_huge_valf32() (__builtin_huge_valf ())
31143#define __builtin_inff32() (__builtin_inff ())
31144#define __builtin_nanf32(x) (__builtin_nanf (x))
31145#define __builtin_nansf32(x) (__builtin_nansf (x))
31146#define __builtin_huge_valf64() (__builtin_huge_val ())
31147#define __builtin_inff64() (__builtin_inf ())
31148#define __builtin_nanf64(x) (__builtin_nan (x))
31149#define __builtin_nansf64(x) (__builtin_nans (x))
31150#define __builtin_huge_valf32x() (__builtin_huge_val ())
31151#define __builtin_inff32x() (__builtin_inf ())
31152#define __builtin_nanf32x(x) (__builtin_nan (x))
31153#define __builtin_nansf32x(x) (__builtin_nans (x))
31154#define __builtin_huge_valf64x() (__builtin_huge_vall ())
31155#define __builtin_inff64x() (__builtin_infl ())
31156#define __builtin_nanf64x(x) (__builtin_nanl (x))
31157#define __builtin_nansf64x(x) (__builtin_nansl (x))
31158#define __ldiv_t_defined 1
31159#define __lldiv_t_defined 1
31160#define RAND_MAX 2147483647
31161#define EXIT_FAILURE 1
31162#define EXIT_SUCCESS 0
31163#define MB_CUR_MAX (__ctype_get_mb_cur_max ())
31164#define _BITS_TYPES_LOCALE_T_H 1
31165#define _BITS_TYPES___LOCALE_T_H 1
31166#define _ALLOCA_H 1
31167#define __need_size_t
31168#undef __need_size_t
31169#undef alloca
31170#define alloca(size) __builtin_alloca (size)
31171#define __COMPAR_FN_T
31172#define __STDLIB_MB_LEN_MAX 16
31173#define __STDDEF_H
31174#define __need_ptrdiff_t
31175#define __need_size_t
31176#define __need_wchar_t
31177#define __need_NULL
31178#define __need_STDDEF_H_misc
31179#define _PTRDIFF_T
31180#undef __need_ptrdiff_t
31181#undef __need_size_t
31182#undef __need_wchar_t
31183#undef NULL
31184#define NULL ((void*)0)
31185#undef __need_NULL
31186#define offsetof(t,d) __builtin_offsetof(t, d)
31187#undef __need_STDDEF_H_misc
31188#define _STRING_H 1
31189#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
31190#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
31191#undef __GLIBC_USE_LIB_EXT2
31192#define __GLIBC_USE_LIB_EXT2 1
31193#undef __GLIBC_USE_IEC_60559_BFP_EXT
31194#define __GLIBC_USE_IEC_60559_BFP_EXT 1
31195#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
31196#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
31197#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
31198#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
31199#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
31200#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
31201#undef __GLIBC_USE_IEC_60559_TYPES_EXT
31202#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
31203#define __need_size_t
31204#define __need_NULL
31205#undef __need_size_t
31206#undef NULL
31207#define NULL ((void*)0)
31208#undef __need_NULL
31209#define strdupa(s) (__extension__ ({ const char *__old = (s); size_t __len = strlen (__old) + 1; char *__new = (char *) __builtin_alloca (__len); (char *) memcpy (__new, __old, __len); }))
31210#define strndupa(s,n) (__extension__ ({ const char *__old = (s); size_t __len = strnlen (__old, (n)); char *__new = (char *) __builtin_alloca (__len + 1); __new[__len] = '\0'; (char *) memcpy (__new, __old, __len); }))
31211#define _STRINGS_H 1
31212#define __need_size_t
31213#undef __need_size_t
31214#define __STRINGS_FORTIFIED 1
31215#define _BITS_STRING_FORTIFIED_H 1
31216#define __CLANG_INTTYPES_H
31217#define _INTTYPES_H 1
31218#define __CLANG_STDINT_H
31219#define _STDINT_H 1
31220#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
31221#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
31222#undef __GLIBC_USE_LIB_EXT2
31223#define __GLIBC_USE_LIB_EXT2 1
31224#undef __GLIBC_USE_IEC_60559_BFP_EXT
31225#define __GLIBC_USE_IEC_60559_BFP_EXT 1
31226#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
31227#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
31228#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
31229#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
31230#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
31231#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
31232#undef __GLIBC_USE_IEC_60559_TYPES_EXT
31233#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
31234#define _BITS_WCHAR_H 1
31235#define __WCHAR_MAX __WCHAR_MAX__
31236#define __WCHAR_MIN (-__WCHAR_MAX - 1)
31237#define __WORDSIZE 64
31238#define __WORDSIZE_TIME64_COMPAT32 1
31239#define __SYSCALL_WORDSIZE 64
31240#define _BITS_STDINT_UINTN_H 1
31241#define __intptr_t_defined
31242#define __INT64_C(c) c ## L
31243#define __UINT64_C(c) c ## UL
31244#define INT8_MIN (-128)
31245#define INT16_MIN (-32767-1)
31246#define INT32_MIN (-2147483647-1)
31247#define INT64_MIN (-__INT64_C(9223372036854775807)-1)
31248#define INT8_MAX (127)
31249#define INT16_MAX (32767)
31250#define INT32_MAX (2147483647)
31251#define INT64_MAX (__INT64_C(9223372036854775807))
31252#define UINT8_MAX (255)
31253#define UINT16_MAX (65535)
31254#define UINT32_MAX (4294967295U)
31255#define UINT64_MAX (__UINT64_C(18446744073709551615))
31256#define INT_LEAST8_MIN (-128)
31257#define INT_LEAST16_MIN (-32767-1)
31258#define INT_LEAST32_MIN (-2147483647-1)
31259#define INT_LEAST64_MIN (-__INT64_C(9223372036854775807)-1)
31260#define INT_LEAST8_MAX (127)
31261#define INT_LEAST16_MAX (32767)
31262#define INT_LEAST32_MAX (2147483647)
31263#define INT_LEAST64_MAX (__INT64_C(9223372036854775807))
31264#define UINT_LEAST8_MAX (255)
31265#define UINT_LEAST16_MAX (65535)
31266#define UINT_LEAST32_MAX (4294967295U)
31267#define UINT_LEAST64_MAX (__UINT64_C(18446744073709551615))
31268#define INT_FAST8_MIN (-128)
31269#define INT_FAST16_MIN (-9223372036854775807L-1)
31270#define INT_FAST32_MIN (-9223372036854775807L-1)
31271#define INT_FAST64_MIN (-__INT64_C(9223372036854775807)-1)
31272#define INT_FAST8_MAX (127)
31273#define INT_FAST16_MAX (9223372036854775807L)
31274#define INT_FAST32_MAX (9223372036854775807L)
31275#define INT_FAST64_MAX (__INT64_C(9223372036854775807))
31276#define UINT_FAST8_MAX (255)
31277#define UINT_FAST16_MAX (18446744073709551615UL)
31278#define UINT_FAST32_MAX (18446744073709551615UL)
31279#define UINT_FAST64_MAX (__UINT64_C(18446744073709551615))
31280#define INTPTR_MIN (-9223372036854775807L-1)
31281#define INTPTR_MAX (9223372036854775807L)
31282#define UINTPTR_MAX (18446744073709551615UL)
31283#define INTMAX_MIN (-__INT64_C(9223372036854775807)-1)
31284#define INTMAX_MAX (__INT64_C(9223372036854775807))
31285#define UINTMAX_MAX (__UINT64_C(18446744073709551615))
31286#define PTRDIFF_MIN (-9223372036854775807L-1)
31287#define PTRDIFF_MAX (9223372036854775807L)
31288#define SIG_ATOMIC_MIN (-2147483647-1)
31289#define SIG_ATOMIC_MAX (2147483647)
31290#define SIZE_MAX (18446744073709551615UL)
31291#define WCHAR_MIN __WCHAR_MIN
31292#define WCHAR_MAX __WCHAR_MAX
31293#define WINT_MIN (0u)
31294#define WINT_MAX (4294967295u)
31295#define INT8_C(c) c
31296#define INT16_C(c) c
31297#define INT32_C(c) c
31298#define INT64_C(c) c ## L
31299#define UINT8_C(c) c
31300#define UINT16_C(c) c
31301#define UINT32_C(c) c ## U
31302#define UINT64_C(c) c ## UL
31303#define INTMAX_C(c) c ## L
31304#define UINTMAX_C(c) c ## UL
31305#define INT8_WIDTH 8
31306#define UINT8_WIDTH 8
31307#define INT16_WIDTH 16
31308#define UINT16_WIDTH 16
31309#define INT32_WIDTH 32
31310#define UINT32_WIDTH 32
31311#define INT64_WIDTH 64
31312#define UINT64_WIDTH 64
31313#define INT_LEAST8_WIDTH 8
31314#define UINT_LEAST8_WIDTH 8
31315#define INT_LEAST16_WIDTH 16
31316#define UINT_LEAST16_WIDTH 16
31317#define INT_LEAST32_WIDTH 32
31318#define UINT_LEAST32_WIDTH 32
31319#define INT_LEAST64_WIDTH 64
31320#define UINT_LEAST64_WIDTH 64
31321#define INT_FAST8_WIDTH 8
31322#define UINT_FAST8_WIDTH 8
31323#define INT_FAST16_WIDTH __WORDSIZE
31324#define UINT_FAST16_WIDTH __WORDSIZE
31325#define INT_FAST32_WIDTH __WORDSIZE
31326#define UINT_FAST32_WIDTH __WORDSIZE
31327#define INT_FAST64_WIDTH 64
31328#define UINT_FAST64_WIDTH 64
31329#define INTPTR_WIDTH __WORDSIZE
31330#define UINTPTR_WIDTH __WORDSIZE
31331#define INTMAX_WIDTH 64
31332#define UINTMAX_WIDTH 64
31333#define PTRDIFF_WIDTH __WORDSIZE
31334#define SIG_ATOMIC_WIDTH 32
31335#define SIZE_WIDTH __WORDSIZE
31336#define WCHAR_WIDTH 32
31337#define WINT_WIDTH 32
31338#define ____gwchar_t_defined 1
31339#define __PRI64_PREFIX "l"
31340#define __PRIPTR_PREFIX "l"
31341#define PRId8 "d"
31342#define PRId16 "d"
31343#define PRId32 "d"
31344#define PRId64 __PRI64_PREFIX "d"
31345#define PRIdLEAST8 "d"
31346#define PRIdLEAST16 "d"
31347#define PRIdLEAST32 "d"
31348#define PRIdLEAST64 __PRI64_PREFIX "d"
31349#define PRIdFAST8 "d"
31350#define PRIdFAST16 __PRIPTR_PREFIX "d"
31351#define PRIdFAST32 __PRIPTR_PREFIX "d"
31352#define PRIdFAST64 __PRI64_PREFIX "d"
31353#define PRIi8 "i"
31354#define PRIi16 "i"
31355#define PRIi32 "i"
31356#define PRIi64 __PRI64_PREFIX "i"
31357#define PRIiLEAST8 "i"
31358#define PRIiLEAST16 "i"
31359#define PRIiLEAST32 "i"
31360#define PRIiLEAST64 __PRI64_PREFIX "i"
31361#define PRIiFAST8 "i"
31362#define PRIiFAST16 __PRIPTR_PREFIX "i"
31363#define PRIiFAST32 __PRIPTR_PREFIX "i"
31364#define PRIiFAST64 __PRI64_PREFIX "i"
31365#define PRIo8 "o"
31366#define PRIo16 "o"
31367#define PRIo32 "o"
31368#define PRIo64 __PRI64_PREFIX "o"
31369#define PRIoLEAST8 "o"
31370#define PRIoLEAST16 "o"
31371#define PRIoLEAST32 "o"
31372#define PRIoLEAST64 __PRI64_PREFIX "o"
31373#define PRIoFAST8 "o"
31374#define PRIoFAST16 __PRIPTR_PREFIX "o"
31375#define PRIoFAST32 __PRIPTR_PREFIX "o"
31376#define PRIoFAST64 __PRI64_PREFIX "o"
31377#define PRIu8 "u"
31378#define PRIu16 "u"
31379#define PRIu32 "u"
31380#define PRIu64 __PRI64_PREFIX "u"
31381#define PRIuLEAST8 "u"
31382#define PRIuLEAST16 "u"
31383#define PRIuLEAST32 "u"
31384#define PRIuLEAST64 __PRI64_PREFIX "u"
31385#define PRIuFAST8 "u"
31386#define PRIuFAST16 __PRIPTR_PREFIX "u"
31387#define PRIuFAST32 __PRIPTR_PREFIX "u"
31388#define PRIuFAST64 __PRI64_PREFIX "u"
31389#define PRIx8 "x"
31390#define PRIx16 "x"
31391#define PRIx32 "x"
31392#define PRIx64 __PRI64_PREFIX "x"
31393#define PRIxLEAST8 "x"
31394#define PRIxLEAST16 "x"
31395#define PRIxLEAST32 "x"
31396#define PRIxLEAST64 __PRI64_PREFIX "x"
31397#define PRIxFAST8 "x"
31398#define PRIxFAST16 __PRIPTR_PREFIX "x"
31399#define PRIxFAST32 __PRIPTR_PREFIX "x"
31400#define PRIxFAST64 __PRI64_PREFIX "x"
31401#define PRIX8 "X"
31402#define PRIX16 "X"
31403#define PRIX32 "X"
31404#define PRIX64 __PRI64_PREFIX "X"
31405#define PRIXLEAST8 "X"
31406#define PRIXLEAST16 "X"
31407#define PRIXLEAST32 "X"
31408#define PRIXLEAST64 __PRI64_PREFIX "X"
31409#define PRIXFAST8 "X"
31410#define PRIXFAST16 __PRIPTR_PREFIX "X"
31411#define PRIXFAST32 __PRIPTR_PREFIX "X"
31412#define PRIXFAST64 __PRI64_PREFIX "X"
31413#define PRIdMAX __PRI64_PREFIX "d"
31414#define PRIiMAX __PRI64_PREFIX "i"
31415#define PRIoMAX __PRI64_PREFIX "o"
31416#define PRIuMAX __PRI64_PREFIX "u"
31417#define PRIxMAX __PRI64_PREFIX "x"
31418#define PRIXMAX __PRI64_PREFIX "X"
31419#define PRIdPTR __PRIPTR_PREFIX "d"
31420#define PRIiPTR __PRIPTR_PREFIX "i"
31421#define PRIoPTR __PRIPTR_PREFIX "o"
31422#define PRIuPTR __PRIPTR_PREFIX "u"
31423#define PRIxPTR __PRIPTR_PREFIX "x"
31424#define PRIXPTR __PRIPTR_PREFIX "X"
31425#define SCNd8 "hhd"
31426#define SCNd16 "hd"
31427#define SCNd32 "d"
31428#define SCNd64 __PRI64_PREFIX "d"
31429#define SCNdLEAST8 "hhd"
31430#define SCNdLEAST16 "hd"
31431#define SCNdLEAST32 "d"
31432#define SCNdLEAST64 __PRI64_PREFIX "d"
31433#define SCNdFAST8 "hhd"
31434#define SCNdFAST16 __PRIPTR_PREFIX "d"
31435#define SCNdFAST32 __PRIPTR_PREFIX "d"
31436#define SCNdFAST64 __PRI64_PREFIX "d"
31437#define SCNi8 "hhi"
31438#define SCNi16 "hi"
31439#define SCNi32 "i"
31440#define SCNi64 __PRI64_PREFIX "i"
31441#define SCNiLEAST8 "hhi"
31442#define SCNiLEAST16 "hi"
31443#define SCNiLEAST32 "i"
31444#define SCNiLEAST64 __PRI64_PREFIX "i"
31445#define SCNiFAST8 "hhi"
31446#define SCNiFAST16 __PRIPTR_PREFIX "i"
31447#define SCNiFAST32 __PRIPTR_PREFIX "i"
31448#define SCNiFAST64 __PRI64_PREFIX "i"
31449#define SCNu8 "hhu"
31450#define SCNu16 "hu"
31451#define SCNu32 "u"
31452#define SCNu64 __PRI64_PREFIX "u"
31453#define SCNuLEAST8 "hhu"
31454#define SCNuLEAST16 "hu"
31455#define SCNuLEAST32 "u"
31456#define SCNuLEAST64 __PRI64_PREFIX "u"
31457#define SCNuFAST8 "hhu"
31458#define SCNuFAST16 __PRIPTR_PREFIX "u"
31459#define SCNuFAST32 __PRIPTR_PREFIX "u"
31460#define SCNuFAST64 __PRI64_PREFIX "u"
31461#define SCNo8 "hho"
31462#define SCNo16 "ho"
31463#define SCNo32 "o"
31464#define SCNo64 __PRI64_PREFIX "o"
31465#define SCNoLEAST8 "hho"
31466#define SCNoLEAST16 "ho"
31467#define SCNoLEAST32 "o"
31468#define SCNoLEAST64 __PRI64_PREFIX "o"
31469#define SCNoFAST8 "hho"
31470#define SCNoFAST16 __PRIPTR_PREFIX "o"
31471#define SCNoFAST32 __PRIPTR_PREFIX "o"
31472#define SCNoFAST64 __PRI64_PREFIX "o"
31473#define SCNx8 "hhx"
31474#define SCNx16 "hx"
31475#define SCNx32 "x"
31476#define SCNx64 __PRI64_PREFIX "x"
31477#define SCNxLEAST8 "hhx"
31478#define SCNxLEAST16 "hx"
31479#define SCNxLEAST32 "x"
31480#define SCNxLEAST64 __PRI64_PREFIX "x"
31481#define SCNxFAST8 "hhx"
31482#define SCNxFAST16 __PRIPTR_PREFIX "x"
31483#define SCNxFAST32 __PRIPTR_PREFIX "x"
31484#define SCNxFAST64 __PRI64_PREFIX "x"
31485#define SCNdMAX __PRI64_PREFIX "d"
31486#define SCNiMAX __PRI64_PREFIX "i"
31487#define SCNoMAX __PRI64_PREFIX "o"
31488#define SCNuMAX __PRI64_PREFIX "u"
31489#define SCNxMAX __PRI64_PREFIX "x"
31490#define SCNdPTR __PRIPTR_PREFIX "d"
31491#define SCNiPTR __PRIPTR_PREFIX "i"
31492#define SCNoPTR __PRIPTR_PREFIX "o"
31493#define SCNuPTR __PRIPTR_PREFIX "u"
31494#define SCNxPTR __PRIPTR_PREFIX "x"
31495#define __STDALIGN_H
31496#define alignas _Alignas
31497#define alignof _Alignof
31498#define __alignas_is_defined 1
31499#define __alignof_is_defined 1
31500#define _UNISTD_H 1
31501#define _POSIX_VERSION 200809L
31502#define __POSIX2_THIS_VERSION 200809L
31503#define _POSIX2_VERSION __POSIX2_THIS_VERSION
31504#define _POSIX2_C_VERSION __POSIX2_THIS_VERSION
31505#define _POSIX2_C_BIND __POSIX2_THIS_VERSION
31506#define _POSIX2_C_DEV __POSIX2_THIS_VERSION
31507#define _POSIX2_SW_DEV __POSIX2_THIS_VERSION
31508#define _POSIX2_LOCALEDEF __POSIX2_THIS_VERSION
31509#define _XOPEN_VERSION 700
31510#define _XOPEN_XCU_VERSION 4
31511#define _XOPEN_XPG2 1
31512#define _XOPEN_XPG3 1
31513#define _XOPEN_XPG4 1
31514#define _XOPEN_UNIX 1
31515#define _XOPEN_ENH_I18N 1
31516#define _XOPEN_LEGACY 1
31517#define _BITS_POSIX_OPT_H 1
31518#define _POSIX_JOB_CONTROL 1
31519#define _POSIX_SAVED_IDS 1
31520#define _POSIX_PRIORITY_SCHEDULING 200809L
31521#define _POSIX_SYNCHRONIZED_IO 200809L
31522#define _POSIX_FSYNC 200809L
31523#define _POSIX_MAPPED_FILES 200809L
31524#define _POSIX_MEMLOCK 200809L
31525#define _POSIX_MEMLOCK_RANGE 200809L
31526#define _POSIX_MEMORY_PROTECTION 200809L
31527#define _POSIX_CHOWN_RESTRICTED 0
31528#define _POSIX_VDISABLE '\0'
31529#define _POSIX_NO_TRUNC 1
31530#define _XOPEN_REALTIME 1
31531#define _XOPEN_REALTIME_THREADS 1
31532#define _XOPEN_SHM 1
31533#define _POSIX_THREADS 200809L
31534#define _POSIX_REENTRANT_FUNCTIONS 1
31535#define _POSIX_THREAD_SAFE_FUNCTIONS 200809L
31536#define _POSIX_THREAD_PRIORITY_SCHEDULING 200809L
31537#define _POSIX_THREAD_ATTR_STACKSIZE 200809L
31538#define _POSIX_THREAD_ATTR_STACKADDR 200809L
31539#define _POSIX_THREAD_PRIO_INHERIT 200809L
31540#define _POSIX_THREAD_PRIO_PROTECT 200809L
31541#define _POSIX_THREAD_ROBUST_PRIO_INHERIT 200809L
31542#define _POSIX_THREAD_ROBUST_PRIO_PROTECT -1
31543#define _POSIX_SEMAPHORES 200809L
31544#define _POSIX_REALTIME_SIGNALS 200809L
31545#define _POSIX_ASYNCHRONOUS_IO 200809L
31546#define _POSIX_ASYNC_IO 1
31547#define _LFS_ASYNCHRONOUS_IO 1
31548#define _POSIX_PRIORITIZED_IO 200809L
31549#define _LFS64_ASYNCHRONOUS_IO 1
31550#define _LFS_LARGEFILE 1
31551#define _LFS64_LARGEFILE 1
31552#define _LFS64_STDIO 1
31553#define _POSIX_SHARED_MEMORY_OBJECTS 200809L
31554#define _POSIX_CPUTIME 0
31555#define _POSIX_THREAD_CPUTIME 0
31556#define _POSIX_REGEXP 1
31557#define _POSIX_READER_WRITER_LOCKS 200809L
31558#define _POSIX_SHELL 1
31559#define _POSIX_TIMEOUTS 200809L
31560#define _POSIX_SPIN_LOCKS 200809L
31561#define _POSIX_SPAWN 200809L
31562#define _POSIX_TIMERS 200809L
31563#define _POSIX_BARRIERS 200809L
31564#define _POSIX_MESSAGE_PASSING 200809L
31565#define _POSIX_THREAD_PROCESS_SHARED 200809L
31566#define _POSIX_MONOTONIC_CLOCK 0
31567#define _POSIX_CLOCK_SELECTION 200809L
31568#define _POSIX_ADVISORY_INFO 200809L
31569#define _POSIX_IPV6 200809L
31570#define _POSIX_RAW_SOCKETS 200809L
31571#define _POSIX2_CHAR_TERM 200809L
31572#define _POSIX_SPORADIC_SERVER -1
31573#define _POSIX_THREAD_SPORADIC_SERVER -1
31574#define _POSIX_TRACE -1
31575#define _POSIX_TRACE_EVENT_FILTER -1
31576#define _POSIX_TRACE_INHERIT -1
31577#define _POSIX_TRACE_LOG -1
31578#define _POSIX_TYPED_MEMORY_OBJECTS -1
31579#define __WORDSIZE 64
31580#define __WORDSIZE_TIME64_COMPAT32 1
31581#define __SYSCALL_WORDSIZE 64
31582#define _POSIX_V7_LPBIG_OFFBIG -1
31583#define _POSIX_V6_LPBIG_OFFBIG -1
31584#define _XBS5_LPBIG_OFFBIG -1
31585#define _POSIX_V7_LP64_OFF64 1
31586#define _POSIX_V6_LP64_OFF64 1
31587#define _XBS5_LP64_OFF64 1
31588#define __ILP32_OFF32_CFLAGS "-m32"
31589#define __ILP32_OFF32_LDFLAGS "-m32"
31590#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
31591#define __ILP32_OFFBIG_LDFLAGS "-m32"
31592#define __LP64_OFF64_CFLAGS "-m64"
31593#define __LP64_OFF64_LDFLAGS "-m64"
31594#define STDIN_FILENO 0
31595#define STDOUT_FILENO 1
31596#define STDERR_FILENO 2
31597#define __need_size_t
31598#define __need_NULL
31599#undef __need_size_t
31600#undef NULL
31601#define NULL ((void*)0)
31602#undef __need_NULL
31603#define __socklen_t_defined
31604#define R_OK 4
31605#define W_OK 2
31606#define X_OK 1
31607#define F_OK 0
31608#define L_SET SEEK_SET
31609#define L_INCR SEEK_CUR
31610#define L_XTND SEEK_END
31611#define _PC_LINK_MAX _PC_LINK_MAX
31612#define _PC_MAX_CANON _PC_MAX_CANON
31613#define _PC_MAX_INPUT _PC_MAX_INPUT
31614#define _PC_NAME_MAX _PC_NAME_MAX
31615#define _PC_PATH_MAX _PC_PATH_MAX
31616#define _PC_PIPE_BUF _PC_PIPE_BUF
31617#define _PC_CHOWN_RESTRICTED _PC_CHOWN_RESTRICTED
31618#define _PC_NO_TRUNC _PC_NO_TRUNC
31619#define _PC_VDISABLE _PC_VDISABLE
31620#define _PC_SYNC_IO _PC_SYNC_IO
31621#define _PC_ASYNC_IO _PC_ASYNC_IO
31622#define _PC_PRIO_IO _PC_PRIO_IO
31623#define _PC_SOCK_MAXBUF _PC_SOCK_MAXBUF
31624#define _PC_FILESIZEBITS _PC_FILESIZEBITS
31625#define _PC_REC_INCR_XFER_SIZE _PC_REC_INCR_XFER_SIZE
31626#define _PC_REC_MAX_XFER_SIZE _PC_REC_MAX_XFER_SIZE
31627#define _PC_REC_MIN_XFER_SIZE _PC_REC_MIN_XFER_SIZE
31628#define _PC_REC_XFER_ALIGN _PC_REC_XFER_ALIGN
31629#define _PC_ALLOC_SIZE_MIN _PC_ALLOC_SIZE_MIN
31630#define _PC_SYMLINK_MAX _PC_SYMLINK_MAX
31631#define _PC_2_SYMLINKS _PC_2_SYMLINKS
31632#define _SC_ARG_MAX _SC_ARG_MAX
31633#define _SC_CHILD_MAX _SC_CHILD_MAX
31634#define _SC_CLK_TCK _SC_CLK_TCK
31635#define _SC_NGROUPS_MAX _SC_NGROUPS_MAX
31636#define _SC_OPEN_MAX _SC_OPEN_MAX
31637#define _SC_STREAM_MAX _SC_STREAM_MAX
31638#define _SC_TZNAME_MAX _SC_TZNAME_MAX
31639#define _SC_JOB_CONTROL _SC_JOB_CONTROL
31640#define _SC_SAVED_IDS _SC_SAVED_IDS
31641#define _SC_REALTIME_SIGNALS _SC_REALTIME_SIGNALS
31642#define _SC_PRIORITY_SCHEDULING _SC_PRIORITY_SCHEDULING
31643#define _SC_TIMERS _SC_TIMERS
31644#define _SC_ASYNCHRONOUS_IO _SC_ASYNCHRONOUS_IO
31645#define _SC_PRIORITIZED_IO _SC_PRIORITIZED_IO
31646#define _SC_SYNCHRONIZED_IO _SC_SYNCHRONIZED_IO
31647#define _SC_FSYNC _SC_FSYNC
31648#define _SC_MAPPED_FILES _SC_MAPPED_FILES
31649#define _SC_MEMLOCK _SC_MEMLOCK
31650#define _SC_MEMLOCK_RANGE _SC_MEMLOCK_RANGE
31651#define _SC_MEMORY_PROTECTION _SC_MEMORY_PROTECTION
31652#define _SC_MESSAGE_PASSING _SC_MESSAGE_PASSING
31653#define _SC_SEMAPHORES _SC_SEMAPHORES
31654#define _SC_SHARED_MEMORY_OBJECTS _SC_SHARED_MEMORY_OBJECTS
31655#define _SC_AIO_LISTIO_MAX _SC_AIO_LISTIO_MAX
31656#define _SC_AIO_MAX _SC_AIO_MAX
31657#define _SC_AIO_PRIO_DELTA_MAX _SC_AIO_PRIO_DELTA_MAX
31658#define _SC_DELAYTIMER_MAX _SC_DELAYTIMER_MAX
31659#define _SC_MQ_OPEN_MAX _SC_MQ_OPEN_MAX
31660#define _SC_MQ_PRIO_MAX _SC_MQ_PRIO_MAX
31661#define _SC_VERSION _SC_VERSION
31662#define _SC_PAGESIZE _SC_PAGESIZE
31663#define _SC_PAGE_SIZE _SC_PAGESIZE
31664#define _SC_RTSIG_MAX _SC_RTSIG_MAX
31665#define _SC_SEM_NSEMS_MAX _SC_SEM_NSEMS_MAX
31666#define _SC_SEM_VALUE_MAX _SC_SEM_VALUE_MAX
31667#define _SC_SIGQUEUE_MAX _SC_SIGQUEUE_MAX
31668#define _SC_TIMER_MAX _SC_TIMER_MAX
31669#define _SC_BC_BASE_MAX _SC_BC_BASE_MAX
31670#define _SC_BC_DIM_MAX _SC_BC_DIM_MAX
31671#define _SC_BC_SCALE_MAX _SC_BC_SCALE_MAX
31672#define _SC_BC_STRING_MAX _SC_BC_STRING_MAX
31673#define _SC_COLL_WEIGHTS_MAX _SC_COLL_WEIGHTS_MAX
31674#define _SC_EQUIV_CLASS_MAX _SC_EQUIV_CLASS_MAX
31675#define _SC_EXPR_NEST_MAX _SC_EXPR_NEST_MAX
31676#define _SC_LINE_MAX _SC_LINE_MAX
31677#define _SC_RE_DUP_MAX _SC_RE_DUP_MAX
31678#define _SC_CHARCLASS_NAME_MAX _SC_CHARCLASS_NAME_MAX
31679#define _SC_2_VERSION _SC_2_VERSION
31680#define _SC_2_C_BIND _SC_2_C_BIND
31681#define _SC_2_C_DEV _SC_2_C_DEV
31682#define _SC_2_FORT_DEV _SC_2_FORT_DEV
31683#define _SC_2_FORT_RUN _SC_2_FORT_RUN
31684#define _SC_2_SW_DEV _SC_2_SW_DEV
31685#define _SC_2_LOCALEDEF _SC_2_LOCALEDEF
31686#define _SC_PII _SC_PII
31687#define _SC_PII_XTI _SC_PII_XTI
31688#define _SC_PII_SOCKET _SC_PII_SOCKET
31689#define _SC_PII_INTERNET _SC_PII_INTERNET
31690#define _SC_PII_OSI _SC_PII_OSI
31691#define _SC_POLL _SC_POLL
31692#define _SC_SELECT _SC_SELECT
31693#define _SC_UIO_MAXIOV _SC_UIO_MAXIOV
31694#define _SC_IOV_MAX _SC_IOV_MAX
31695#define _SC_PII_INTERNET_STREAM _SC_PII_INTERNET_STREAM
31696#define _SC_PII_INTERNET_DGRAM _SC_PII_INTERNET_DGRAM
31697#define _SC_PII_OSI_COTS _SC_PII_OSI_COTS
31698#define _SC_PII_OSI_CLTS _SC_PII_OSI_CLTS
31699#define _SC_PII_OSI_M _SC_PII_OSI_M
31700#define _SC_T_IOV_MAX _SC_T_IOV_MAX
31701#define _SC_THREADS _SC_THREADS
31702#define _SC_THREAD_SAFE_FUNCTIONS _SC_THREAD_SAFE_FUNCTIONS
31703#define _SC_GETGR_R_SIZE_MAX _SC_GETGR_R_SIZE_MAX
31704#define _SC_GETPW_R_SIZE_MAX _SC_GETPW_R_SIZE_MAX
31705#define _SC_LOGIN_NAME_MAX _SC_LOGIN_NAME_MAX
31706#define _SC_TTY_NAME_MAX _SC_TTY_NAME_MAX
31707#define _SC_THREAD_DESTRUCTOR_ITERATIONS _SC_THREAD_DESTRUCTOR_ITERATIONS
31708#define _SC_THREAD_KEYS_MAX _SC_THREAD_KEYS_MAX
31709#define _SC_THREAD_STACK_MIN _SC_THREAD_STACK_MIN
31710#define _SC_THREAD_THREADS_MAX _SC_THREAD_THREADS_MAX
31711#define _SC_THREAD_ATTR_STACKADDR _SC_THREAD_ATTR_STACKADDR
31712#define _SC_THREAD_ATTR_STACKSIZE _SC_THREAD_ATTR_STACKSIZE
31713#define _SC_THREAD_PRIORITY_SCHEDULING _SC_THREAD_PRIORITY_SCHEDULING
31714#define _SC_THREAD_PRIO_INHERIT _SC_THREAD_PRIO_INHERIT
31715#define _SC_THREAD_PRIO_PROTECT _SC_THREAD_PRIO_PROTECT
31716#define _SC_THREAD_PROCESS_SHARED _SC_THREAD_PROCESS_SHARED
31717#define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_CONF
31718#define _SC_NPROCESSORS_ONLN _SC_NPROCESSORS_ONLN
31719#define _SC_PHYS_PAGES _SC_PHYS_PAGES
31720#define _SC_AVPHYS_PAGES _SC_AVPHYS_PAGES
31721#define _SC_ATEXIT_MAX _SC_ATEXIT_MAX
31722#define _SC_PASS_MAX _SC_PASS_MAX
31723#define _SC_XOPEN_VERSION _SC_XOPEN_VERSION
31724#define _SC_XOPEN_XCU_VERSION _SC_XOPEN_XCU_VERSION
31725#define _SC_XOPEN_UNIX _SC_XOPEN_UNIX
31726#define _SC_XOPEN_CRYPT _SC_XOPEN_CRYPT
31727#define _SC_XOPEN_ENH_I18N _SC_XOPEN_ENH_I18N
31728#define _SC_XOPEN_SHM _SC_XOPEN_SHM
31729#define _SC_2_CHAR_TERM _SC_2_CHAR_TERM
31730#define _SC_2_C_VERSION _SC_2_C_VERSION
31731#define _SC_2_UPE _SC_2_UPE
31732#define _SC_XOPEN_XPG2 _SC_XOPEN_XPG2
31733#define _SC_XOPEN_XPG3 _SC_XOPEN_XPG3
31734#define _SC_XOPEN_XPG4 _SC_XOPEN_XPG4
31735#define _SC_CHAR_BIT _SC_CHAR_BIT
31736#define _SC_CHAR_MAX _SC_CHAR_MAX
31737#define _SC_CHAR_MIN _SC_CHAR_MIN
31738#define _SC_INT_MAX _SC_INT_MAX
31739#define _SC_INT_MIN _SC_INT_MIN
31740#define _SC_LONG_BIT _SC_LONG_BIT
31741#define _SC_WORD_BIT _SC_WORD_BIT
31742#define _SC_MB_LEN_MAX _SC_MB_LEN_MAX
31743#define _SC_NZERO _SC_NZERO
31744#define _SC_SSIZE_MAX _SC_SSIZE_MAX
31745#define _SC_SCHAR_MAX _SC_SCHAR_MAX
31746#define _SC_SCHAR_MIN _SC_SCHAR_MIN
31747#define _SC_SHRT_MAX _SC_SHRT_MAX
31748#define _SC_SHRT_MIN _SC_SHRT_MIN
31749#define _SC_UCHAR_MAX _SC_UCHAR_MAX
31750#define _SC_UINT_MAX _SC_UINT_MAX
31751#define _SC_ULONG_MAX _SC_ULONG_MAX
31752#define _SC_USHRT_MAX _SC_USHRT_MAX
31753#define _SC_NL_ARGMAX _SC_NL_ARGMAX
31754#define _SC_NL_LANGMAX _SC_NL_LANGMAX
31755#define _SC_NL_MSGMAX _SC_NL_MSGMAX
31756#define _SC_NL_NMAX _SC_NL_NMAX
31757#define _SC_NL_SETMAX _SC_NL_SETMAX
31758#define _SC_NL_TEXTMAX _SC_NL_TEXTMAX
31759#define _SC_XBS5_ILP32_OFF32 _SC_XBS5_ILP32_OFF32
31760#define _SC_XBS5_ILP32_OFFBIG _SC_XBS5_ILP32_OFFBIG
31761#define _SC_XBS5_LP64_OFF64 _SC_XBS5_LP64_OFF64
31762#define _SC_XBS5_LPBIG_OFFBIG _SC_XBS5_LPBIG_OFFBIG
31763#define _SC_XOPEN_LEGACY _SC_XOPEN_LEGACY
31764#define _SC_XOPEN_REALTIME _SC_XOPEN_REALTIME
31765#define _SC_XOPEN_REALTIME_THREADS _SC_XOPEN_REALTIME_THREADS
31766#define _SC_ADVISORY_INFO _SC_ADVISORY_INFO
31767#define _SC_BARRIERS _SC_BARRIERS
31768#define _SC_BASE _SC_BASE
31769#define _SC_C_LANG_SUPPORT _SC_C_LANG_SUPPORT
31770#define _SC_C_LANG_SUPPORT_R _SC_C_LANG_SUPPORT_R
31771#define _SC_CLOCK_SELECTION _SC_CLOCK_SELECTION
31772#define _SC_CPUTIME _SC_CPUTIME
31773#define _SC_THREAD_CPUTIME _SC_THREAD_CPUTIME
31774#define _SC_DEVICE_IO _SC_DEVICE_IO
31775#define _SC_DEVICE_SPECIFIC _SC_DEVICE_SPECIFIC
31776#define _SC_DEVICE_SPECIFIC_R _SC_DEVICE_SPECIFIC_R
31777#define _SC_FD_MGMT _SC_FD_MGMT
31778#define _SC_FIFO _SC_FIFO
31779#define _SC_PIPE _SC_PIPE
31780#define _SC_FILE_ATTRIBUTES _SC_FILE_ATTRIBUTES
31781#define _SC_FILE_LOCKING _SC_FILE_LOCKING
31782#define _SC_FILE_SYSTEM _SC_FILE_SYSTEM
31783#define _SC_MONOTONIC_CLOCK _SC_MONOTONIC_CLOCK
31784#define _SC_MULTI_PROCESS _SC_MULTI_PROCESS
31785#define _SC_SINGLE_PROCESS _SC_SINGLE_PROCESS
31786#define _SC_NETWORKING _SC_NETWORKING
31787#define _SC_READER_WRITER_LOCKS _SC_READER_WRITER_LOCKS
31788#define _SC_SPIN_LOCKS _SC_SPIN_LOCKS
31789#define _SC_REGEXP _SC_REGEXP
31790#define _SC_REGEX_VERSION _SC_REGEX_VERSION
31791#define _SC_SHELL _SC_SHELL
31792#define _SC_SIGNALS _SC_SIGNALS
31793#define _SC_SPAWN _SC_SPAWN
31794#define _SC_SPORADIC_SERVER _SC_SPORADIC_SERVER
31795#define _SC_THREAD_SPORADIC_SERVER _SC_THREAD_SPORADIC_SERVER
31796#define _SC_SYSTEM_DATABASE _SC_SYSTEM_DATABASE
31797#define _SC_SYSTEM_DATABASE_R _SC_SYSTEM_DATABASE_R
31798#define _SC_TIMEOUTS _SC_TIMEOUTS
31799#define _SC_TYPED_MEMORY_OBJECTS _SC_TYPED_MEMORY_OBJECTS
31800#define _SC_USER_GROUPS _SC_USER_GROUPS
31801#define _SC_USER_GROUPS_R _SC_USER_GROUPS_R
31802#define _SC_2_PBS _SC_2_PBS
31803#define _SC_2_PBS_ACCOUNTING _SC_2_PBS_ACCOUNTING
31804#define _SC_2_PBS_LOCATE _SC_2_PBS_LOCATE
31805#define _SC_2_PBS_MESSAGE _SC_2_PBS_MESSAGE
31806#define _SC_2_PBS_TRACK _SC_2_PBS_TRACK
31807#define _SC_SYMLOOP_MAX _SC_SYMLOOP_MAX
31808#define _SC_STREAMS _SC_STREAMS
31809#define _SC_2_PBS_CHECKPOINT _SC_2_PBS_CHECKPOINT
31810#define _SC_V6_ILP32_OFF32 _SC_V6_ILP32_OFF32
31811#define _SC_V6_ILP32_OFFBIG _SC_V6_ILP32_OFFBIG
31812#define _SC_V6_LP64_OFF64 _SC_V6_LP64_OFF64
31813#define _SC_V6_LPBIG_OFFBIG _SC_V6_LPBIG_OFFBIG
31814#define _SC_HOST_NAME_MAX _SC_HOST_NAME_MAX
31815#define _SC_TRACE _SC_TRACE
31816#define _SC_TRACE_EVENT_FILTER _SC_TRACE_EVENT_FILTER
31817#define _SC_TRACE_INHERIT _SC_TRACE_INHERIT
31818#define _SC_TRACE_LOG _SC_TRACE_LOG
31819#define _SC_LEVEL1_ICACHE_SIZE _SC_LEVEL1_ICACHE_SIZE
31820#define _SC_LEVEL1_ICACHE_ASSOC _SC_LEVEL1_ICACHE_ASSOC
31821#define _SC_LEVEL1_ICACHE_LINESIZE _SC_LEVEL1_ICACHE_LINESIZE
31822#define _SC_LEVEL1_DCACHE_SIZE _SC_LEVEL1_DCACHE_SIZE
31823#define _SC_LEVEL1_DCACHE_ASSOC _SC_LEVEL1_DCACHE_ASSOC
31824#define _SC_LEVEL1_DCACHE_LINESIZE _SC_LEVEL1_DCACHE_LINESIZE
31825#define _SC_LEVEL2_CACHE_SIZE _SC_LEVEL2_CACHE_SIZE
31826#define _SC_LEVEL2_CACHE_ASSOC _SC_LEVEL2_CACHE_ASSOC
31827#define _SC_LEVEL2_CACHE_LINESIZE _SC_LEVEL2_CACHE_LINESIZE
31828#define _SC_LEVEL3_CACHE_SIZE _SC_LEVEL3_CACHE_SIZE
31829#define _SC_LEVEL3_CACHE_ASSOC _SC_LEVEL3_CACHE_ASSOC
31830#define _SC_LEVEL3_CACHE_LINESIZE _SC_LEVEL3_CACHE_LINESIZE
31831#define _SC_LEVEL4_CACHE_SIZE _SC_LEVEL4_CACHE_SIZE
31832#define _SC_LEVEL4_CACHE_ASSOC _SC_LEVEL4_CACHE_ASSOC
31833#define _SC_LEVEL4_CACHE_LINESIZE _SC_LEVEL4_CACHE_LINESIZE
31834#define _SC_IPV6 _SC_IPV6
31835#define _SC_RAW_SOCKETS _SC_RAW_SOCKETS
31836#define _SC_V7_ILP32_OFF32 _SC_V7_ILP32_OFF32
31837#define _SC_V7_ILP32_OFFBIG _SC_V7_ILP32_OFFBIG
31838#define _SC_V7_LP64_OFF64 _SC_V7_LP64_OFF64
31839#define _SC_V7_LPBIG_OFFBIG _SC_V7_LPBIG_OFFBIG
31840#define _SC_SS_REPL_MAX _SC_SS_REPL_MAX
31841#define _SC_TRACE_EVENT_NAME_MAX _SC_TRACE_EVENT_NAME_MAX
31842#define _SC_TRACE_NAME_MAX _SC_TRACE_NAME_MAX
31843#define _SC_TRACE_SYS_MAX _SC_TRACE_SYS_MAX
31844#define _SC_TRACE_USER_EVENT_MAX _SC_TRACE_USER_EVENT_MAX
31845#define _SC_XOPEN_STREAMS _SC_XOPEN_STREAMS
31846#define _SC_THREAD_ROBUST_PRIO_INHERIT _SC_THREAD_ROBUST_PRIO_INHERIT
31847#define _SC_THREAD_ROBUST_PRIO_PROTECT _SC_THREAD_ROBUST_PRIO_PROTECT
31848#define _CS_PATH _CS_PATH
31849#define _CS_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS
31850#define _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS _CS_V6_WIDTH_RESTRICTED_ENVS
31851#define _CS_GNU_LIBC_VERSION _CS_GNU_LIBC_VERSION
31852#define _CS_GNU_LIBPTHREAD_VERSION _CS_GNU_LIBPTHREAD_VERSION
31853#define _CS_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS
31854#define _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS _CS_V5_WIDTH_RESTRICTED_ENVS
31855#define _CS_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS
31856#define _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS _CS_V7_WIDTH_RESTRICTED_ENVS
31857#define _CS_LFS_CFLAGS _CS_LFS_CFLAGS
31858#define _CS_LFS_LDFLAGS _CS_LFS_LDFLAGS
31859#define _CS_LFS_LIBS _CS_LFS_LIBS
31860#define _CS_LFS_LINTFLAGS _CS_LFS_LINTFLAGS
31861#define _CS_LFS64_CFLAGS _CS_LFS64_CFLAGS
31862#define _CS_LFS64_LDFLAGS _CS_LFS64_LDFLAGS
31863#define _CS_LFS64_LIBS _CS_LFS64_LIBS
31864#define _CS_LFS64_LINTFLAGS _CS_LFS64_LINTFLAGS
31865#define _CS_XBS5_ILP32_OFF32_CFLAGS _CS_XBS5_ILP32_OFF32_CFLAGS
31866#define _CS_XBS5_ILP32_OFF32_LDFLAGS _CS_XBS5_ILP32_OFF32_LDFLAGS
31867#define _CS_XBS5_ILP32_OFF32_LIBS _CS_XBS5_ILP32_OFF32_LIBS
31868#define _CS_XBS5_ILP32_OFF32_LINTFLAGS _CS_XBS5_ILP32_OFF32_LINTFLAGS
31869#define _CS_XBS5_ILP32_OFFBIG_CFLAGS _CS_XBS5_ILP32_OFFBIG_CFLAGS
31870#define _CS_XBS5_ILP32_OFFBIG_LDFLAGS _CS_XBS5_ILP32_OFFBIG_LDFLAGS
31871#define _CS_XBS5_ILP32_OFFBIG_LIBS _CS_XBS5_ILP32_OFFBIG_LIBS
31872#define _CS_XBS5_ILP32_OFFBIG_LINTFLAGS _CS_XBS5_ILP32_OFFBIG_LINTFLAGS
31873#define _CS_XBS5_LP64_OFF64_CFLAGS _CS_XBS5_LP64_OFF64_CFLAGS
31874#define _CS_XBS5_LP64_OFF64_LDFLAGS _CS_XBS5_LP64_OFF64_LDFLAGS
31875#define _CS_XBS5_LP64_OFF64_LIBS _CS_XBS5_LP64_OFF64_LIBS
31876#define _CS_XBS5_LP64_OFF64_LINTFLAGS _CS_XBS5_LP64_OFF64_LINTFLAGS
31877#define _CS_XBS5_LPBIG_OFFBIG_CFLAGS _CS_XBS5_LPBIG_OFFBIG_CFLAGS
31878#define _CS_XBS5_LPBIG_OFFBIG_LDFLAGS _CS_XBS5_LPBIG_OFFBIG_LDFLAGS
31879#define _CS_XBS5_LPBIG_OFFBIG_LIBS _CS_XBS5_LPBIG_OFFBIG_LIBS
31880#define _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS
31881#define _CS_POSIX_V6_ILP32_OFF32_CFLAGS _CS_POSIX_V6_ILP32_OFF32_CFLAGS
31882#define _CS_POSIX_V6_ILP32_OFF32_LDFLAGS _CS_POSIX_V6_ILP32_OFF32_LDFLAGS
31883#define _CS_POSIX_V6_ILP32_OFF32_LIBS _CS_POSIX_V6_ILP32_OFF32_LIBS
31884#define _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS
31885#define _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS
31886#define _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS
31887#define _CS_POSIX_V6_ILP32_OFFBIG_LIBS _CS_POSIX_V6_ILP32_OFFBIG_LIBS
31888#define _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS
31889#define _CS_POSIX_V6_LP64_OFF64_CFLAGS _CS_POSIX_V6_LP64_OFF64_CFLAGS
31890#define _CS_POSIX_V6_LP64_OFF64_LDFLAGS _CS_POSIX_V6_LP64_OFF64_LDFLAGS
31891#define _CS_POSIX_V6_LP64_OFF64_LIBS _CS_POSIX_V6_LP64_OFF64_LIBS
31892#define _CS_POSIX_V6_LP64_OFF64_LINTFLAGS _CS_POSIX_V6_LP64_OFF64_LINTFLAGS
31893#define _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS
31894#define _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS
31895#define _CS_POSIX_V6_LPBIG_OFFBIG_LIBS _CS_POSIX_V6_LPBIG_OFFBIG_LIBS
31896#define _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS
31897#define _CS_POSIX_V7_ILP32_OFF32_CFLAGS _CS_POSIX_V7_ILP32_OFF32_CFLAGS
31898#define _CS_POSIX_V7_ILP32_OFF32_LDFLAGS _CS_POSIX_V7_ILP32_OFF32_LDFLAGS
31899#define _CS_POSIX_V7_ILP32_OFF32_LIBS _CS_POSIX_V7_ILP32_OFF32_LIBS
31900#define _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS
31901#define _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS
31902#define _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS
31903#define _CS_POSIX_V7_ILP32_OFFBIG_LIBS _CS_POSIX_V7_ILP32_OFFBIG_LIBS
31904#define _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS
31905#define _CS_POSIX_V7_LP64_OFF64_CFLAGS _CS_POSIX_V7_LP64_OFF64_CFLAGS
31906#define _CS_POSIX_V7_LP64_OFF64_LDFLAGS _CS_POSIX_V7_LP64_OFF64_LDFLAGS
31907#define _CS_POSIX_V7_LP64_OFF64_LIBS _CS_POSIX_V7_LP64_OFF64_LIBS
31908#define _CS_POSIX_V7_LP64_OFF64_LINTFLAGS _CS_POSIX_V7_LP64_OFF64_LINTFLAGS
31909#define _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
31910#define _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
31911#define _CS_POSIX_V7_LPBIG_OFFBIG_LIBS _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
31912#define _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
31913#define _CS_V6_ENV _CS_V6_ENV
31914#define _CS_V7_ENV _CS_V7_ENV
31915#define _GETOPT_POSIX_H 1
31916#define _GETOPT_CORE_H 1
31917#define F_ULOCK 0
31918#define F_LOCK 1
31919#define F_TLOCK 2
31920#define F_TEST 3
31921#define TEMP_FAILURE_RETRY(expression) (__extension__ ({ long int __result; do __result = (long int) (expression); while (__result == -1L && errno == EINTR); __result; }))
31922#define RBIMPL_DLLEXPORT_H
31923#undef RUBY_EXTERN
31924#define RUBY_EXTERN extern
31925#define MJIT_FUNC_EXPORTED RUBY_FUNC_EXPORTED
31926#define MJIT_SYMBOL_EXPORT_BEGIN RUBY_SYMBOL_EXPORT_BEGIN
31927#define MJIT_SYMBOL_EXPORT_END RUBY_SYMBOL_EXPORT_END
31928#define MJIT_STATIC static
31929#define RBIMPL_SYMBOL_EXPORT_BEGIN() RUBY_SYMBOL_EXPORT_BEGIN
31930#define RBIMPL_SYMBOL_EXPORT_END() RUBY_SYMBOL_EXPORT_END
31931#define RBIMPL_DOSISH_H
31932#define PATH_SEP ":"
31933#define PATH_SEP_CHAR PATH_SEP[0]
31934#define PATH_ENV "PATH"
31935#define CASEFOLD_FILESYSTEM 0
31936#define RBIMPL_XMALLOC_H
31937#define RBIMPL_ATTR_ALLOC_SIZE_H
31938#define RBIMPL_HAS_ATTRIBUTE_H
31939#define RBIMPL_TOKEN_PASTE_H
31940#define RBIMPL_HAS_WARNING_H
31941#define RBIMPL_HAS_WARNING(_) __has_warning(_)
31942#define RBIMPL_WARNING_PUSH_H
31943#define RBIMPL_WARNING_PRAGMA0(x) _Pragma(# x)
31944#define RBIMPL_WARNING_PRAGMA1(x) RBIMPL_WARNING_PRAGMA0(clang diagnostic x)
31945#define RBIMPL_WARNING_PRAGMA2(x,y) RBIMPL_WARNING_PRAGMA1(x # y)
31946#define RBIMPL_WARNING_PUSH() RBIMPL_WARNING_PRAGMA1(push)
31947#define RBIMPL_WARNING_POP() RBIMPL_WARNING_PRAGMA1(pop)
31948#define RBIMPL_WARNING_ERROR(flag) RBIMPL_WARNING_PRAGMA2(error, flag)
31949#define RBIMPL_WARNING_IGNORED(flag) RBIMPL_WARNING_PRAGMA2(ignored, flag)
31950#define RBIMPL_TOKEN_PASTE(x,y) RBIMPL_WARNING_PUSH() RBIMPL_WARNING_IGNORED(-Wundef) TOKEN_PASTE(x, y) RBIMPL_WARNING_POP()
31951#define RBIMPL_HAVE___HAS_ATTRIBUTE 1
31952#define RBIMPL_HAS_ATTRIBUTE(_) __has_attribute(_)
31953#define RBIMPL_ATTR_ALLOC_SIZE(tuple) __attribute__((__alloc_size__ tuple))
31954#define RBIMPL_ATTR_NODISCARD_H
31955#define RBIMPL_HAS_C_ATTRIBUTE_H
31956#define RBIMPL_HAS_C_ATTRIBUTE(_) __has_c_attribute(_)
31957#define RBIMPL_HAS_CPP_ATTRIBUTE_H
31958#define RBIMPL_HAS_CPP_ATTRIBUTE0(_) 0
31959#define RBIMPL_HAS_CPP_ATTRIBUTE(_) 0
31960#define RBIMPL_ATTR_NODISCARD() __attribute__((__warn_unused_result__))
31961#define RBIMPL_ATTR_NOEXCEPT_H
31962#define RBIMPL_HAS_FEATURE_H
31963#define RBIMPL_HAS_FEATURE(_) __has_feature(_)
31964#define RBIMPL_ATTR_NOEXCEPT(_)
31965#define RBIMPL_ATTR_RESTRICT_H
31966#define RBIMPL_ATTR_RESTRICT() __attribute__((__malloc__))
31967#define RBIMPL_ATTR_RETURNS_NONNULL_H
31968#define RBIMPL_ATTR_RETURNS_NONNULL() __attribute__((__returns_nonnull__))
31969#define USE_GC_MALLOC_OBJ_INFO_DETAILS 0
31970#define xmalloc ruby_xmalloc
31971#define xmalloc2 ruby_xmalloc2
31972#define xcalloc ruby_xcalloc
31973#define xrealloc ruby_xrealloc
31974#define xrealloc2 ruby_xrealloc2
31975#define xfree ruby_xfree
31976#pragma GCC visibility push(default)
31977#pragma GCC visibility pop
31978#define RUBY_BACKWARD2_ASSUME_H
31979#define RBIMPL_ASSUME_H
31980#define RBIMPL_CAST_H
31981#define RBIMPL_CAST(expr) (expr)
31982#define RBIMPL_HAS_BUILTIN_H
31983#define RBIMPL_HAVE___HAS_BUILTIN 1
31984#define RBIMPL_HAS_BUILTIN(_) __has_builtin(_)
31985#define RBIMPL_UNREACHABLE_RETURN(_) __builtin_unreachable()
31986#define RBIMPL_UNREACHABLE __builtin_unreachable
31987#define RBIMPL_ASSUME __builtin_assume
31988#undef ASSUME
31989#undef UNREACHABLE
31990#define ASSUME RBIMPL_ASSUME
31991#define UNREACHABLE RBIMPL_UNREACHABLE()
31992#define UNREACHABLE_RETURN RBIMPL_UNREACHABLE_RETURN
31993#define RB_LIKELY(x) (__builtin_expect(!!(x), 1))
31994#define RB_UNLIKELY(x) (__builtin_expect(!!(x), 0))
31995#define RUBY_BACKWARD2_ATTRIBUTES_H
31996#define RBIMPL_ATTR_CONST_H
31997#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE_H
31998#define RBIMPL_HAS_DECLSPEC_ATTRIBUTE(_) __has_declspec_attribute(_)
31999#define RBIMPL_ATTR_CONST() __attribute__((__const__))
32000#define RBIMPL_ATTR_CONST_UNLESS_DEBUG() RBIMPL_ATTR_CONST()
32001#define RBIMPL_ATTR_DEPRECATED_H
32002#define RBIMPL_HAS_EXTENSION_H
32003#define RBIMPL_HAS_EXTENSION(_) __has_extension(_)
32004#define RBIMPL_ATTR_DEPRECATED(msg) __attribute__((__deprecated__ msg))
32005#define RBIMPL_ATTR_ERROR_H
32006#define RBIMPL_ATTR_ERROR(msg)
32007#define RBIMPL_ATTR_FORCEINLINE_H
32008#define RBIMPL_ATTR_FORCEINLINE() __attribute__((__always_inline__)) inline
32009#define RBIMPL_ATTR_FORMAT_H
32010#define RBIMPL_ATTR_FORMAT(x,y,z) __attribute__((__format__(x, y, z)))
32011#define RBIMPL_PRINTF_FORMAT __printf__
32012#define RBIMPL_ATTR_MAYBE_UNUSED_H
32013#define RBIMPL_ATTR_MAYBE_UNUSED() __attribute__((__unused__))
32014#define RBIMPL_ATTR_NOINLINE_H
32015#define RBIMPL_ATTR_NOINLINE() __declspec(noinline)
32016#define RBIMPL_ATTR_NONNULL_H
32017#define RBIMPL_ATTR_NONNULL(list) __attribute__((__nonnull__ list))
32018#define RBIMPL_ATTR_NORETURN_H
32019#define RBIMPL_ATTR_NORETURN() __declspec(noreturn)
32020#define RBIMPL_ATTR_PURE_H
32021#define RUBY_ASSERT_H
32022#define RBIMPL_RUBY_DEBUG 0
32023#define RBIMPL_NDEBUG 0
32024#undef RUBY_DEBUG
32025#undef RUBY_NDEBUG
32026#undef NDEBUG
32027#define RUBY_DEBUG 0
32028#define RUBY_NDEBUG 1
32029#define NDEBUG
32030#undef RBIMPL_NDEBUG
32031#undef RBIMPL_RUBY_DEBUG
32032#define RBIMPL_ASSERT_NOTHING RBIMPL_CAST((void)0)
32033#pragma GCC visibility push(default)
32034#pragma GCC visibility pop
32035#define RBIMPL_ASSERT_FUNC RUBY_FUNCTION_NAME_STRING
32036#define RUBY_ASSERT_FAIL(mesg) rb_assert_failure(__FILE__, __LINE__, RBIMPL_ASSERT_FUNC, mesg)
32037#define RUBY_ASSERT_MESG(expr,mesg) (RB_LIKELY(expr) ? RBIMPL_ASSERT_NOTHING : RUBY_ASSERT_FAIL(mesg))
32038#define RUBY_ASSERT_ALWAYS(expr) RUBY_ASSERT_MESG((expr), #expr)
32039#define RUBY_ASSERT(expr) RBIMPL_ASSERT_NOTHING
32040#define RUBY_ASSERT_NDEBUG(expr) RBIMPL_ASSERT_NOTHING
32041#define RUBY_ASSERT_MESG_WHEN(cond,expr,mesg) ((cond) ? RUBY_ASSERT_MESG((expr), (mesg)) : RBIMPL_ASSERT_NOTHING)
32042#define RUBY_ASSERT_WHEN(cond,expr) RUBY_ASSERT_MESG_WHEN((cond), (expr), #expr)
32043#define RBIMPL_ASSERT_OR_ASSUME(expr) RBIMPL_ASSERT_NOTHING
32044#define RBIMPL_ATTR_PURE() __attribute__((__pure__))
32045#define RBIMPL_ATTR_PURE_UNLESS_DEBUG() RBIMPL_ATTR_PURE()
32046#define RBIMPL_ATTR_WARNING_H
32047#define RBIMPL_ATTR_WARNING(msg)
32048#undef CONSTFUNC
32049#define CONSTFUNC(x) RBIMPL_ATTR_CONST() x
32050#undef PUREFUNC
32051#define PUREFUNC(x) RBIMPL_ATTR_PURE() x
32052#undef DEPRECATED
32053#define DEPRECATED(x) RBIMPL_ATTR_DEPRECATED(("")) x
32054#undef DEPRECATED_BY
32055#define DEPRECATED_BY(n,x) RBIMPL_ATTR_DEPRECATED(("by: " # n)) x
32056#undef DEPRECATED_TYPE
32057#define DEPRECATED_TYPE(mseg,decl) decl RBIMPL_ATTR_DEPRECATED(mseg)
32058#undef RUBY_CXX_DEPRECATED
32059#define RUBY_CXX_DEPRECATED(mseg) RBIMPL_ATTR_DEPRECATED((mseg))
32060#undef NOINLINE
32061#define NOINLINE(x) RBIMPL_ATTR_NOINLINE() x
32062#undef ERRORFUNC
32063#define ERRORFUNC(mesg,x) RBIMPL_ATTR_ERROR(mesg) x
32064#define HAVE_ATTRIBUTE_ERRORFUNC 0
32065#undef WARNINGFUNC
32066#define WARNINGFUNC(mesg,x) RBIMPL_ATTR_WARNING(mesg) x
32067#define HAVE_ATTRIBUTE_WARNINGFUNC 0
32068#undef COLDFUNC
32069#define PRINTF_ARGS(decl,string_index,first_to_check) RBIMPL_ATTR_FORMAT(RBIMPL_PRINTF_FORMAT, (string_index), (first_to_check)) decl
32070#undef RUBY_ATTR_ALLOC_SIZE
32071#define RUBY_ATTR_ALLOC_SIZE RBIMPL_ATTR_ALLOC_SIZE
32072#undef RUBY_ATTR_MALLOC
32073#define RUBY_ATTR_MALLOC RBIMPL_ATTR_RESTRICT()
32074#undef RUBY_ATTR_RETURNS_NONNULL
32075#define RUBY_ATTR_RETURNS_NONNULL RBIMPL_ATTR_RETURNS_NONNULL()
32076#define FUNC_MINIMIZED(x) x
32077#define FUNC_UNOPTIMIZED(x) x
32078#define RUBY_ALIAS_FUNCTION(prot,name,args) RUBY_ALIAS_FUNCTION_TYPE(VALUE, prot, name, args)
32079#undef RUBY_FUNC_NONNULL
32080#define RUBY_FUNC_NONNULL(n,x) RBIMPL_ATTR_NONNULL(n) x
32081#undef NORETURN
32082#define NORETURN(x) RBIMPL_ATTR_NORETURN() x
32083#define NORETURN_STYLE_NEW
32084#define PACKED_STRUCT_UNALIGNED(x) PACKED_STRUCT(x)
32085#undef RB_UNUSED_VAR
32086#define RB_UNUSED_VAR(x) x RBIMPL_ATTR_MAYBE_UNUSED()
32087#define RUBY_BACKWARD2_BOOL_H
32088#define RBIMPL_STDBOOL_H
32089#define __STDBOOL_H
32090#define bool _Bool
32091#define true 1
32092#define false 0
32093#define __bool_true_false_are_defined 1
32094#define FALSE false
32095#define TRUE true
32096#define RUBY_BACKWARD2_EXTERN_H
32097#define EXTERN _Pragma("message \"EXTERN is deprecated, use RUBY_EXTERN instead\""); RUBY_EXTERN
32098#define RUBY_BACKWARD2_GCC_VERSION_SINCE_H
32099#define GCC_VERSION_SINCE(x,y,z) RBIMPL_COMPILER_SINCE(GCC, (x), (y), (z))
32100#define GCC_VERSION_BEFORE(x,y,z) (RBIMPL_COMPILER_BEFORE(GCC, (x), (y), (z)) || (RBIMPL_COMPILER_IS(GCC) && ((RBIMPL_COMPILER_VERSION_MAJOR == (x)) && ((RBIMPL_COMPILER_VERSION_MINOR == (y)) && (RBIMPL_COMPILER_VERSION_PATCH == (z))))))
32101#define RUBY_BACKWARD2_LONG_LONG_H
32102#define HAVE_TRUE_LONG_LONG 1
32103#define LONG_LONG RBIMPL_WARNING_PUSH() RBIMPL_WARNING_IGNORED(-Wc++11-long-long) long long RBIMPL_WARNING_POP()
32104#define RUBY_BACKWARD2_STDALIGN_H
32105#define RBIMPL_STDALIGN_H
32106#define RBIMPL_ALIGNAS(_) __declspec(align(_))
32107#define RBIMPL_ALIGNOF __extension__ _Alignof
32108#undef RUBY_ALIGNAS
32109#undef RUBY_ALIGNOF
32110#define RUBY_ALIGNAS RBIMPL_ALIGNAS
32111#define RUBY_ALIGNOF RBIMPL_ALIGNOF
32112#define RUBY_BACKWARD2_STDARG_H
32113#undef _
32114#define _(args) args
32115#undef __
32116#define __(args) args
32117#define ANYARGS
32118#define RUBY_MISSING_H 1
32119#define _MATH_H 1
32120#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
32121#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
32122#undef __GLIBC_USE_LIB_EXT2
32123#define __GLIBC_USE_LIB_EXT2 1
32124#undef __GLIBC_USE_IEC_60559_BFP_EXT
32125#define __GLIBC_USE_IEC_60559_BFP_EXT 1
32126#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
32127#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
32128#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
32129#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
32130#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
32131#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
32132#undef __GLIBC_USE_IEC_60559_TYPES_EXT
32133#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
32134#define _BITS_LIBM_SIMD_DECL_STUBS_H 1
32135#define __DECL_SIMD_cos
32136#define __DECL_SIMD_cosf
32137#define __DECL_SIMD_cosl
32138#define __DECL_SIMD_cosf16
32139#define __DECL_SIMD_cosf32
32140#define __DECL_SIMD_cosf64
32141#define __DECL_SIMD_cosf128
32142#define __DECL_SIMD_cosf32x
32143#define __DECL_SIMD_cosf64x
32144#define __DECL_SIMD_cosf128x
32145#define __DECL_SIMD_sin
32146#define __DECL_SIMD_sinf
32147#define __DECL_SIMD_sinl
32148#define __DECL_SIMD_sinf16
32149#define __DECL_SIMD_sinf32
32150#define __DECL_SIMD_sinf64
32151#define __DECL_SIMD_sinf128
32152#define __DECL_SIMD_sinf32x
32153#define __DECL_SIMD_sinf64x
32154#define __DECL_SIMD_sinf128x
32155#define __DECL_SIMD_sincos
32156#define __DECL_SIMD_sincosf
32157#define __DECL_SIMD_sincosl
32158#define __DECL_SIMD_sincosf16
32159#define __DECL_SIMD_sincosf32
32160#define __DECL_SIMD_sincosf64
32161#define __DECL_SIMD_sincosf128
32162#define __DECL_SIMD_sincosf32x
32163#define __DECL_SIMD_sincosf64x
32164#define __DECL_SIMD_sincosf128x
32165#define __DECL_SIMD_log
32166#define __DECL_SIMD_logf
32167#define __DECL_SIMD_logl
32168#define __DECL_SIMD_logf16
32169#define __DECL_SIMD_logf32
32170#define __DECL_SIMD_logf64
32171#define __DECL_SIMD_logf128
32172#define __DECL_SIMD_logf32x
32173#define __DECL_SIMD_logf64x
32174#define __DECL_SIMD_logf128x
32175#define __DECL_SIMD_exp
32176#define __DECL_SIMD_expf
32177#define __DECL_SIMD_expl
32178#define __DECL_SIMD_expf16
32179#define __DECL_SIMD_expf32
32180#define __DECL_SIMD_expf64
32181#define __DECL_SIMD_expf128
32182#define __DECL_SIMD_expf32x
32183#define __DECL_SIMD_expf64x
32184#define __DECL_SIMD_expf128x
32185#define __DECL_SIMD_pow
32186#define __DECL_SIMD_powf
32187#define __DECL_SIMD_powl
32188#define __DECL_SIMD_powf16
32189#define __DECL_SIMD_powf32
32190#define __DECL_SIMD_powf64
32191#define __DECL_SIMD_powf128
32192#define __DECL_SIMD_powf32x
32193#define __DECL_SIMD_powf64x
32194#define __DECL_SIMD_powf128x
32195#define HUGE_VAL (__builtin_huge_val ())
32196#define HUGE_VALF (__builtin_huge_valf ())
32197#define HUGE_VALL (__builtin_huge_vall ())
32198#define HUGE_VAL_F32 (__builtin_huge_valf32 ())
32199#define HUGE_VAL_F64 (__builtin_huge_valf64 ())
32200#define HUGE_VAL_F32X (__builtin_huge_valf32x ())
32201#define HUGE_VAL_F64X (__builtin_huge_valf64x ())
32202#define INFINITY (__builtin_inff ())
32203#define NAN (__builtin_nanf (""))
32204#define SNANF (__builtin_nansf (""))
32205#define SNAN (__builtin_nans (""))
32206#define SNANL (__builtin_nansl (""))
32207#define SNANF32 (__builtin_nansf32 (""))
32208#define SNANF64 (__builtin_nansf64 (""))
32209#define SNANF32X (__builtin_nansf32x (""))
32210#define SNANF64X (__builtin_nansf64x (""))
32211#define __GLIBC_FLT_EVAL_METHOD __FLT_EVAL_METHOD__
32212#define __FP_LOGB0_IS_MIN 1
32213#define __FP_LOGBNAN_IS_MIN 1
32214#define FP_ILOGB0 (-2147483647 - 1)
32215#define FP_ILOGBNAN (-2147483647 - 1)
32216#define __FP_LONG_MAX 0x7fffffffffffffffL
32217#define FP_LLOGB0 (-__FP_LONG_MAX - 1)
32218#define FP_LLOGBNAN (-__FP_LONG_MAX - 1)
32219#define FP_INT_UPWARD 0
32220#define FP_INT_DOWNWARD 1
32221#define FP_INT_TOWARDZERO 2
32222#define FP_INT_TONEARESTFROMZERO 3
32223#define FP_INT_TONEAREST 4
32224#define __SIMD_DECL(function) __CONCAT (__DECL_SIMD_, function)
32225#define __MATHCALL_VEC(function,suffix,args) __SIMD_DECL (__MATH_PRECNAME (function, suffix)) __MATHCALL (function, suffix, args)
32226#define __MATHDECL_VEC(type,function,suffix,args) __SIMD_DECL (__MATH_PRECNAME (function, suffix)) __MATHDECL(type, function,suffix, args)
32227#define __MATHCALL(function,suffix,args) __MATHDECL (_Mdouble_,function,suffix, args)
32228#define __MATHDECL(type,function,suffix,args) __MATHDECL_1(type, function,suffix, args); __MATHDECL_1(type, __CONCAT(__,function),suffix, args)
32229#define __MATHCALLX(function,suffix,args,attrib) __MATHDECLX (_Mdouble_,function,suffix, args, attrib)
32230#define __MATHDECLX(type,function,suffix,args,attrib) __MATHDECL_1(type, function,suffix, args) __attribute__ (attrib); __MATHDECL_1(type, __CONCAT(__,function),suffix, args) __attribute__ (attrib)
32231#define __MATHDECL_1(type,function,suffix,args) extern type __MATH_PRECNAME(function,suffix) args __THROW
32232#define _Mdouble_ double
32233#define __MATH_PRECNAME(name,r) __CONCAT(name,r)
32234#define __MATH_DECLARING_DOUBLE 1
32235#define __MATH_DECLARING_FLOATN 0
32236#undef _Mdouble_
32237#undef __MATH_PRECNAME
32238#undef __MATH_DECLARING_DOUBLE
32239#undef __MATH_DECLARING_FLOATN
32240#define _Mdouble_ float
32241#define __MATH_PRECNAME(name,r) name##f##r
32242#define __MATH_DECLARING_DOUBLE 0
32243#define __MATH_DECLARING_FLOATN 0
32244#undef _Mdouble_
32245#undef __MATH_PRECNAME
32246#undef __MATH_DECLARING_DOUBLE
32247#undef __MATH_DECLARING_FLOATN
32248#define _Mdouble_ long double
32249#define __MATH_PRECNAME(name,r) name##l##r
32250#define __MATH_DECLARING_DOUBLE 0
32251#define __MATH_DECLARING_FLOATN 0
32252#define __MATH_DECLARE_LDOUBLE 1
32253#undef _Mdouble_
32254#undef __MATH_PRECNAME
32255#undef __MATH_DECLARING_DOUBLE
32256#undef __MATH_DECLARING_FLOATN
32257#define _Mdouble_ _Float32
32258#define __MATH_PRECNAME(name,r) name##f32##r
32259#define __MATH_DECLARING_DOUBLE 0
32260#define __MATH_DECLARING_FLOATN 1
32261#undef _Mdouble_
32262#undef __MATH_PRECNAME
32263#undef __MATH_DECLARING_DOUBLE
32264#undef __MATH_DECLARING_FLOATN
32265#define _Mdouble_ _Float64
32266#define __MATH_PRECNAME(name,r) name##f64##r
32267#define __MATH_DECLARING_DOUBLE 0
32268#define __MATH_DECLARING_FLOATN 1
32269#undef _Mdouble_
32270#undef __MATH_PRECNAME
32271#undef __MATH_DECLARING_DOUBLE
32272#undef __MATH_DECLARING_FLOATN
32273#define _Mdouble_ _Float32x
32274#define __MATH_PRECNAME(name,r) name##f32x##r
32275#define __MATH_DECLARING_DOUBLE 0
32276#define __MATH_DECLARING_FLOATN 1
32277#undef _Mdouble_
32278#undef __MATH_PRECNAME
32279#undef __MATH_DECLARING_DOUBLE
32280#undef __MATH_DECLARING_FLOATN
32281#define _Mdouble_ _Float64x
32282#define __MATH_PRECNAME(name,r) name##f64x##r
32283#define __MATH_DECLARING_DOUBLE 0
32284#define __MATH_DECLARING_FLOATN 1
32285#undef _Mdouble_
32286#undef __MATH_PRECNAME
32287#undef __MATH_DECLARING_DOUBLE
32288#undef __MATH_DECLARING_FLOATN
32289#undef __MATHDECL_1
32290#undef __MATHDECL
32291#undef __MATHCALL
32292#define __MATHCALL_NARROW_ARGS_1 (_Marg_ __x)
32293#define __MATHCALL_NARROW_ARGS_2 (_Marg_ __x, _Marg_ __y)
32294#define __MATHCALL_NARROW_ARGS_3 (_Marg_ __x, _Marg_ __y, _Marg_ __z)
32295#define __MATHCALL_NARROW_NORMAL(func,nargs) extern _Mret_ func __MATHCALL_NARROW_ARGS_ ## nargs __THROW
32296#define __MATHCALL_NARROW_REDIR(func,redir,nargs) extern _Mret_ __REDIRECT_NTH (func, __MATHCALL_NARROW_ARGS_ ## nargs, redir)
32297#define __MATHCALL_NARROW(func,redir,nargs) __MATHCALL_NARROW_NORMAL (func, nargs)
32298#define _Mret_ float
32299#define _Marg_ double
32300#define __MATHCALL_NAME(name) f ## name
32301#undef _Mret_
32302#undef _Marg_
32303#undef __MATHCALL_NAME
32304#define _Mret_ float
32305#define _Marg_ long double
32306#define __MATHCALL_NAME(name) f ## name ## l
32307#undef _Mret_
32308#undef _Marg_
32309#undef __MATHCALL_NAME
32310#define _Mret_ double
32311#define _Marg_ long double
32312#define __MATHCALL_NAME(name) d ## name ## l
32313#undef _Mret_
32314#undef _Marg_
32315#undef __MATHCALL_NAME
32316#define _Mret_ _Float32
32317#define _Marg_ _Float32x
32318#define __MATHCALL_NAME(name) f32 ## name ## f32x
32319#undef _Mret_
32320#undef _Marg_
32321#undef __MATHCALL_NAME
32322#define _Mret_ _Float32
32323#define _Marg_ _Float64
32324#define __MATHCALL_NAME(name) f32 ## name ## f64
32325#undef _Mret_
32326#undef _Marg_
32327#undef __MATHCALL_NAME
32328#define _Mret_ _Float32
32329#define _Marg_ _Float64x
32330#define __MATHCALL_NAME(name) f32 ## name ## f64x
32331#undef _Mret_
32332#undef _Marg_
32333#undef __MATHCALL_NAME
32334#define _Mret_ _Float32x
32335#define _Marg_ _Float64
32336#define __MATHCALL_NAME(name) f32x ## name ## f64
32337#undef _Mret_
32338#undef _Marg_
32339#undef __MATHCALL_NAME
32340#define _Mret_ _Float32x
32341#define _Marg_ _Float64x
32342#define __MATHCALL_NAME(name) f32x ## name ## f64x
32343#undef _Mret_
32344#undef _Marg_
32345#undef __MATHCALL_NAME
32346#define _Mret_ _Float64
32347#define _Marg_ _Float64x
32348#define __MATHCALL_NAME(name) f64 ## name ## f64x
32349#undef _Mret_
32350#undef _Marg_
32351#undef __MATHCALL_NAME
32352#undef __MATHCALL_NARROW_ARGS_1
32353#undef __MATHCALL_NARROW_ARGS_2
32354#undef __MATHCALL_NARROW_ARGS_3
32355#undef __MATHCALL_NARROW_NORMAL
32356#undef __MATHCALL_NARROW_REDIR
32357#undef __MATHCALL_NARROW
32358#define __MATH_TG(TG_ARG,FUNC,ARGS) (sizeof (TG_ARG) == sizeof (float) ? FUNC ## f ARGS : sizeof (TG_ARG) == sizeof (double) ? FUNC ARGS : FUNC ## l ARGS)
32359#define FP_NAN 0
32360#define FP_INFINITE 1
32361#define FP_ZERO 2
32362#define FP_SUBNORMAL 3
32363#define FP_NORMAL 4
32364#define fpclassify(x) __builtin_fpclassify (FP_NAN, FP_INFINITE, FP_NORMAL, FP_SUBNORMAL, FP_ZERO, x)
32365#define signbit(x) __builtin_signbit (x)
32366#define isfinite(x) __builtin_isfinite (x)
32367#define isnormal(x) __builtin_isnormal (x)
32368#define isnan(x) __builtin_isnan (x)
32369#define isinf(x) __builtin_isinf_sign (x)
32370#define MATH_ERRNO 1
32371#define MATH_ERREXCEPT 2
32372#define math_errhandling (MATH_ERRNO | MATH_ERREXCEPT)
32373#define __iscanonicalf(x) ((void) (__typeof (x)) (x), 1)
32374#define __iscanonical(x) ((void) (__typeof (x)) (x), 1)
32375#define iscanonical(x) __MATH_TG ((x), __iscanonical, (x))
32376#define issignaling(x) __MATH_TG ((x), __issignaling, (x))
32377#define issubnormal(x) (fpclassify (x) == FP_SUBNORMAL)
32378#define iszero(x) (((__typeof (x)) (x)) == 0)
32379#define MAXFLOAT 3.40282347e+38F
32380#define M_E 2.7182818284590452354
32381#define M_LOG2E 1.4426950408889634074
32382#define M_LOG10E 0.43429448190325182765
32383#define M_LN2 0.69314718055994530942
32384#define M_LN10 2.30258509299404568402
32385#define M_PI 3.14159265358979323846
32386#define M_PI_2 1.57079632679489661923
32387#define M_PI_4 0.78539816339744830962
32388#define M_1_PI 0.31830988618379067154
32389#define M_2_PI 0.63661977236758134308
32390#define M_2_SQRTPI 1.12837916709551257390
32391#define M_SQRT2 1.41421356237309504880
32392#define M_SQRT1_2 0.70710678118654752440
32393#define M_El 2.718281828459045235360287471352662498L
32394#define M_LOG2El 1.442695040888963407359924681001892137L
32395#define M_LOG10El 0.434294481903251827651128918916605082L
32396#define M_LN2l 0.693147180559945309417232121458176568L
32397#define M_LN10l 2.302585092994045684017991454684364208L
32398#define M_PIl 3.141592653589793238462643383279502884L
32399#define M_PI_2l 1.570796326794896619231321691639751442L
32400#define M_PI_4l 0.785398163397448309615660845819875721L
32401#define M_1_PIl 0.318309886183790671537767526745028724L
32402#define M_2_PIl 0.636619772367581343075535053490057448L
32403#define M_2_SQRTPIl 1.128379167095512573896158903121545172L
32404#define M_SQRT2l 1.414213562373095048801688724209698079L
32405#define M_SQRT1_2l 0.707106781186547524400844362104849039L
32406#define M_Ef32 __f32 (2.718281828459045235360287471352662498)
32407#define M_LOG2Ef32 __f32 (1.442695040888963407359924681001892137)
32408#define M_LOG10Ef32 __f32 (0.434294481903251827651128918916605082)
32409#define M_LN2f32 __f32 (0.693147180559945309417232121458176568)
32410#define M_LN10f32 __f32 (2.302585092994045684017991454684364208)
32411#define M_PIf32 __f32 (3.141592653589793238462643383279502884)
32412#define M_PI_2f32 __f32 (1.570796326794896619231321691639751442)
32413#define M_PI_4f32 __f32 (0.785398163397448309615660845819875721)
32414#define M_1_PIf32 __f32 (0.318309886183790671537767526745028724)
32415#define M_2_PIf32 __f32 (0.636619772367581343075535053490057448)
32416#define M_2_SQRTPIf32 __f32 (1.128379167095512573896158903121545172)
32417#define M_SQRT2f32 __f32 (1.414213562373095048801688724209698079)
32418#define M_SQRT1_2f32 __f32 (0.707106781186547524400844362104849039)
32419#define M_Ef64 __f64 (2.718281828459045235360287471352662498)
32420#define M_LOG2Ef64 __f64 (1.442695040888963407359924681001892137)
32421#define M_LOG10Ef64 __f64 (0.434294481903251827651128918916605082)
32422#define M_LN2f64 __f64 (0.693147180559945309417232121458176568)
32423#define M_LN10f64 __f64 (2.302585092994045684017991454684364208)
32424#define M_PIf64 __f64 (3.141592653589793238462643383279502884)
32425#define M_PI_2f64 __f64 (1.570796326794896619231321691639751442)
32426#define M_PI_4f64 __f64 (0.785398163397448309615660845819875721)
32427#define M_1_PIf64 __f64 (0.318309886183790671537767526745028724)
32428#define M_2_PIf64 __f64 (0.636619772367581343075535053490057448)
32429#define M_2_SQRTPIf64 __f64 (1.128379167095512573896158903121545172)
32430#define M_SQRT2f64 __f64 (1.414213562373095048801688724209698079)
32431#define M_SQRT1_2f64 __f64 (0.707106781186547524400844362104849039)
32432#define M_Ef32x __f32x (2.718281828459045235360287471352662498)
32433#define M_LOG2Ef32x __f32x (1.442695040888963407359924681001892137)
32434#define M_LOG10Ef32x __f32x (0.434294481903251827651128918916605082)
32435#define M_LN2f32x __f32x (0.693147180559945309417232121458176568)
32436#define M_LN10f32x __f32x (2.302585092994045684017991454684364208)
32437#define M_PIf32x __f32x (3.141592653589793238462643383279502884)
32438#define M_PI_2f32x __f32x (1.570796326794896619231321691639751442)
32439#define M_PI_4f32x __f32x (0.785398163397448309615660845819875721)
32440#define M_1_PIf32x __f32x (0.318309886183790671537767526745028724)
32441#define M_2_PIf32x __f32x (0.636619772367581343075535053490057448)
32442#define M_2_SQRTPIf32x __f32x (1.128379167095512573896158903121545172)
32443#define M_SQRT2f32x __f32x (1.414213562373095048801688724209698079)
32444#define M_SQRT1_2f32x __f32x (0.707106781186547524400844362104849039)
32445#define M_Ef64x __f64x (2.718281828459045235360287471352662498)
32446#define M_LOG2Ef64x __f64x (1.442695040888963407359924681001892137)
32447#define M_LOG10Ef64x __f64x (0.434294481903251827651128918916605082)
32448#define M_LN2f64x __f64x (0.693147180559945309417232121458176568)
32449#define M_LN10f64x __f64x (2.302585092994045684017991454684364208)
32450#define M_PIf64x __f64x (3.141592653589793238462643383279502884)
32451#define M_PI_2f64x __f64x (1.570796326794896619231321691639751442)
32452#define M_PI_4f64x __f64x (0.785398163397448309615660845819875721)
32453#define M_1_PIf64x __f64x (0.318309886183790671537767526745028724)
32454#define M_2_PIf64x __f64x (0.636619772367581343075535053490057448)
32455#define M_2_SQRTPIf64x __f64x (1.128379167095512573896158903121545172)
32456#define M_SQRT2f64x __f64x (1.414213562373095048801688724209698079)
32457#define M_SQRT1_2f64x __f64x (0.707106781186547524400844362104849039)
32458#define isgreater(x,y) __builtin_isgreater(x, y)
32459#define isgreaterequal(x,y) __builtin_isgreaterequal(x, y)
32460#define isless(x,y) __builtin_isless(x, y)
32461#define islessequal(x,y) __builtin_islessequal(x, y)
32462#define islessgreater(x,y) __builtin_islessgreater(x, y)
32463#define isunordered(x,y) __builtin_isunordered(x, y)
32464#define __MATH_EVAL_FMT2(x,y) ((x) + (y) + 0.0f)
32465#define iseqsig(x,y) __MATH_TG (__MATH_EVAL_FMT2 (x, y), __iseqsig, ((x), (y)))
32466#define _TIME_H 1
32467#define __need_size_t
32468#define __need_NULL
32469#undef __need_size_t
32470#undef NULL
32471#define NULL ((void*)0)
32472#undef __need_NULL
32473#define _BITS_TIME_H 1
32474#define CLOCKS_PER_SEC ((__clock_t) 1000000)
32475#define CLOCK_REALTIME 0
32476#define CLOCK_MONOTONIC 1
32477#define CLOCK_PROCESS_CPUTIME_ID 2
32478#define CLOCK_THREAD_CPUTIME_ID 3
32479#define CLOCK_MONOTONIC_RAW 4
32480#define CLOCK_REALTIME_COARSE 5
32481#define CLOCK_MONOTONIC_COARSE 6
32482#define CLOCK_BOOTTIME 7
32483#define CLOCK_REALTIME_ALARM 8
32484#define CLOCK_BOOTTIME_ALARM 9
32485#define CLOCK_TAI 11
32486#define TIMER_ABSTIME 1
32487#define _BITS_TIMEX_H 1
32488#define ADJ_OFFSET 0x0001
32489#define ADJ_FREQUENCY 0x0002
32490#define ADJ_MAXERROR 0x0004
32491#define ADJ_ESTERROR 0x0008
32492#define ADJ_STATUS 0x0010
32493#define ADJ_TIMECONST 0x0020
32494#define ADJ_TAI 0x0080
32495#define ADJ_SETOFFSET 0x0100
32496#define ADJ_MICRO 0x1000
32497#define ADJ_NANO 0x2000
32498#define ADJ_TICK 0x4000
32499#define ADJ_OFFSET_SINGLESHOT 0x8001
32500#define ADJ_OFFSET_SS_READ 0xa001
32501#define MOD_OFFSET ADJ_OFFSET
32502#define MOD_FREQUENCY ADJ_FREQUENCY
32503#define MOD_MAXERROR ADJ_MAXERROR
32504#define MOD_ESTERROR ADJ_ESTERROR
32505#define MOD_STATUS ADJ_STATUS
32506#define MOD_TIMECONST ADJ_TIMECONST
32507#define MOD_CLKB ADJ_TICK
32508#define MOD_CLKA ADJ_OFFSET_SINGLESHOT
32509#define MOD_TAI ADJ_TAI
32510#define MOD_MICRO ADJ_MICRO
32511#define MOD_NANO ADJ_NANO
32512#define STA_PLL 0x0001
32513#define STA_PPSFREQ 0x0002
32514#define STA_PPSTIME 0x0004
32515#define STA_FLL 0x0008
32516#define STA_INS 0x0010
32517#define STA_DEL 0x0020
32518#define STA_UNSYNC 0x0040
32519#define STA_FREQHOLD 0x0080
32520#define STA_PPSSIGNAL 0x0100
32521#define STA_PPSJITTER 0x0200
32522#define STA_PPSWANDER 0x0400
32523#define STA_PPSERROR 0x0800
32524#define STA_CLOCKERR 0x1000
32525#define STA_NANO 0x2000
32526#define STA_MODE 0x4000
32527#define STA_CLK 0x8000
32528#define STA_RONLY (STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR | STA_CLOCKERR | STA_NANO | STA_MODE | STA_CLK)
32529#define __struct_tm_defined 1
32530#define __itimerspec_defined 1
32531#define TIME_UTC 1
32532#define __isleap(year) ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
32533#define _SYS_TIME_H 1
32534#define TIMEVAL_TO_TIMESPEC(tv,ts) { (ts)->tv_sec = (tv)->tv_sec; (ts)->tv_nsec = (tv)->tv_usec * 1000; }
32535#define TIMESPEC_TO_TIMEVAL(tv,ts) { (tv)->tv_sec = (ts)->tv_sec; (tv)->tv_usec = (ts)->tv_nsec / 1000; }
32536#define ITIMER_REAL ITIMER_REAL
32537#define ITIMER_VIRTUAL ITIMER_VIRTUAL
32538#define ITIMER_PROF ITIMER_PROF
32539#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
32540#define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0)
32541#define timercmp(a,b,CMP) (((a)->tv_sec == (b)->tv_sec) ? ((a)->tv_usec CMP (b)->tv_usec) : ((a)->tv_sec CMP (b)->tv_sec))
32542#define timeradd(a,b,result) do { (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; if ((result)->tv_usec >= 1000000) { ++(result)->tv_sec; (result)->tv_usec -= 1000000; } } while (0)
32543#define timersub(a,b,result) do { (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; if ((result)->tv_usec < 0) { --(result)->tv_sec; (result)->tv_usec += 1000000; } } while (0)
32544#pragma GCC visibility push(default)
32545#pragma GCC visibility pop
32546#define RUBY
32547#define RB_GNUC_EXTENSION __extension__
32548#define RB_GNUC_EXTENSION_BLOCK(x) __extension__ ({ x; })
32549#define RUBY_MBCHAR_MAXSIZE INT_MAX
32550#define FLUSH_REGISTER_WINDOWS ((void)0)
32551#define RBIMPL_ANYARGS_H
32552#define RBIMPL_ATTR_WEAKREF_H
32553#define RBIMPL_ATTR_WEAKREF(sym) __attribute__((__weakref__(# sym)))
32554#define RBIMPL_INTERN_CLASS_H
32555#define RBIMPL_VALUE_H
32556#define RBIMPL_STATIC_ASSERT_H
32557#define _ASSERT_H 1
32558#define __ASSERT_VOID_CAST (void)
32559#define assert(expr) (__ASSERT_VOID_CAST (0))
32560#define assert_perror(errnum) (__ASSERT_VOID_CAST (0))
32561#undef static_assert
32562#define static_assert _Static_assert
32563#define RBIMPL_STATIC_ASSERT0 __extension__ _Static_assert
32564#define RBIMPL_STATIC_ASSERT(name,expr) RBIMPL_STATIC_ASSERT0(expr, # name ": " # expr)
32565#define RUBY_BACKWARD2_LIMITS_H
32566#define __CLANG_LIMITS_H
32567#define _GCC_LIMITS_H_
32568#define _LIBC_LIMITS_H_ 1
32569#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
32570#undef __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
32571#undef __GLIBC_USE_LIB_EXT2
32572#define __GLIBC_USE_LIB_EXT2 1
32573#undef __GLIBC_USE_IEC_60559_BFP_EXT
32574#define __GLIBC_USE_IEC_60559_BFP_EXT 1
32575#undef __GLIBC_USE_IEC_60559_BFP_EXT_C2X
32576#define __GLIBC_USE_IEC_60559_BFP_EXT_C2X 1
32577#undef __GLIBC_USE_IEC_60559_FUNCS_EXT
32578#define __GLIBC_USE_IEC_60559_FUNCS_EXT 1
32579#undef __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X
32580#define __GLIBC_USE_IEC_60559_FUNCS_EXT_C2X 1
32581#undef __GLIBC_USE_IEC_60559_TYPES_EXT
32582#define __GLIBC_USE_IEC_60559_TYPES_EXT 1
32583#define MB_LEN_MAX 16
32584#define LLONG_MIN (-LLONG_MAX-1)
32585#define LLONG_MAX __LONG_LONG_MAX__
32586#define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
32587#define CHAR_WIDTH 8
32588#define SCHAR_WIDTH 8
32589#define UCHAR_WIDTH 8
32590#define SHRT_WIDTH 16
32591#define USHRT_WIDTH 16
32592#define INT_WIDTH 32
32593#define UINT_WIDTH 32
32594#define LONG_WIDTH __WORDSIZE
32595#define ULONG_WIDTH __WORDSIZE
32596#define LLONG_WIDTH 64
32597#define ULLONG_WIDTH 64
32598#define _BITS_POSIX1_LIM_H 1
32599#define __WORDSIZE 64
32600#define __WORDSIZE_TIME64_COMPAT32 1
32601#define __SYSCALL_WORDSIZE 64
32602#define _POSIX_AIO_LISTIO_MAX 2
32603#define _POSIX_AIO_MAX 1
32604#define _POSIX_ARG_MAX 4096
32605#define _POSIX_CHILD_MAX 25
32606#define _POSIX_DELAYTIMER_MAX 32
32607#define _POSIX_HOST_NAME_MAX 255
32608#define _POSIX_LINK_MAX 8
32609#define _POSIX_LOGIN_NAME_MAX 9
32610#define _POSIX_MAX_CANON 255
32611#define _POSIX_MAX_INPUT 255
32612#define _POSIX_MQ_OPEN_MAX 8
32613#define _POSIX_MQ_PRIO_MAX 32
32614#define _POSIX_NAME_MAX 14
32615#define _POSIX_NGROUPS_MAX 8
32616#define _POSIX_OPEN_MAX 20
32617#define _POSIX_FD_SETSIZE _POSIX_OPEN_MAX
32618#define _POSIX_PATH_MAX 256
32619#define _POSIX_PIPE_BUF 512
32620#define _POSIX_RE_DUP_MAX 255
32621#define _POSIX_RTSIG_MAX 8
32622#define _POSIX_SEM_NSEMS_MAX 256
32623#define _POSIX_SEM_VALUE_MAX 32767
32624#define _POSIX_SIGQUEUE_MAX 32
32625#define _POSIX_SSIZE_MAX 32767
32626#define _POSIX_STREAM_MAX 8
32627#define _POSIX_SYMLINK_MAX 255
32628#define _POSIX_SYMLOOP_MAX 8
32629#define _POSIX_TIMER_MAX 32
32630#define _POSIX_TTY_NAME_MAX 9
32631#define _POSIX_TZNAME_MAX 6
32632#define _POSIX_QLIMIT 1
32633#define _POSIX_HIWAT _POSIX_PIPE_BUF
32634#define _POSIX_UIO_MAXIOV 16
32635#define _POSIX_CLOCKRES_MIN 20000000
32636#define __undef_NR_OPEN
32637#define __undef_LINK_MAX
32638#define __undef_OPEN_MAX
32639#define __undef_ARG_MAX
32640#define _LINUX_LIMITS_H
32641#define NR_OPEN 1024
32642#define NGROUPS_MAX 65536
32643#define ARG_MAX 131072
32644#define LINK_MAX 127
32645#define MAX_CANON 255
32646#define MAX_INPUT 255
32647#define NAME_MAX 255
32648#define PATH_MAX 4096
32649#define PIPE_BUF 4096
32650#define XATTR_NAME_MAX 255
32651#define XATTR_SIZE_MAX 65536
32652#define XATTR_LIST_MAX 65536
32653#define RTSIG_MAX 32
32654#undef NR_OPEN
32655#undef __undef_NR_OPEN
32656#undef LINK_MAX
32657#undef __undef_LINK_MAX
32658#undef OPEN_MAX
32659#undef __undef_OPEN_MAX
32660#undef ARG_MAX
32661#undef __undef_ARG_MAX
32662#define _POSIX_THREAD_KEYS_MAX 128
32663#define PTHREAD_KEYS_MAX 1024
32664#define _POSIX_THREAD_DESTRUCTOR_ITERATIONS 4
32665#define PTHREAD_DESTRUCTOR_ITERATIONS _POSIX_THREAD_DESTRUCTOR_ITERATIONS
32666#define _POSIX_THREAD_THREADS_MAX 64
32667#undef PTHREAD_THREADS_MAX
32668#define AIO_PRIO_DELTA_MAX 20
32669#define PTHREAD_STACK_MIN 16384
32670#define DELAYTIMER_MAX 2147483647
32671#define TTY_NAME_MAX 32
32672#define LOGIN_NAME_MAX 256
32673#define HOST_NAME_MAX 64
32674#define MQ_PRIO_MAX 32768
32675#define SEM_VALUE_MAX (2147483647)
32676#define SSIZE_MAX LONG_MAX
32677#define _BITS_POSIX2_LIM_H 1
32678#define _POSIX2_BC_BASE_MAX 99
32679#define _POSIX2_BC_DIM_MAX 2048
32680#define _POSIX2_BC_SCALE_MAX 99
32681#define _POSIX2_BC_STRING_MAX 1000
32682#define _POSIX2_COLL_WEIGHTS_MAX 2
32683#define _POSIX2_EXPR_NEST_MAX 32
32684#define _POSIX2_LINE_MAX 2048
32685#define _POSIX2_RE_DUP_MAX 255
32686#define _POSIX2_CHARCLASS_NAME_MAX 14
32687#define BC_BASE_MAX _POSIX2_BC_BASE_MAX
32688#define BC_DIM_MAX _POSIX2_BC_DIM_MAX
32689#define BC_SCALE_MAX _POSIX2_BC_SCALE_MAX
32690#define BC_STRING_MAX _POSIX2_BC_STRING_MAX
32691#define COLL_WEIGHTS_MAX 255
32692#define EXPR_NEST_MAX _POSIX2_EXPR_NEST_MAX
32693#define LINE_MAX _POSIX2_LINE_MAX
32694#define CHARCLASS_NAME_MAX 2048
32695#define RE_DUP_MAX (0x7fff)
32696#define _XOPEN_LIM_H 1
32697#define _XOPEN_IOV_MAX _POSIX_UIO_MAXIOV
32698#define _BITS_UIO_LIM_H 1
32699#define __IOV_MAX 1024
32700#define IOV_MAX __IOV_MAX
32701#define NL_ARGMAX _POSIX_ARG_MAX
32702#define NL_LANGMAX _POSIX2_LINE_MAX
32703#define NL_MSGMAX INT_MAX
32704#define NL_NMAX INT_MAX
32705#define NL_SETMAX INT_MAX
32706#define NL_TEXTMAX INT_MAX
32707#define NZERO 20
32708#define WORD_BIT 32
32709#define LONG_BIT 64
32710#undef SCHAR_MIN
32711#undef SCHAR_MAX
32712#undef UCHAR_MAX
32713#undef SHRT_MIN
32714#undef SHRT_MAX
32715#undef USHRT_MAX
32716#undef INT_MIN
32717#undef INT_MAX
32718#undef UINT_MAX
32719#undef LONG_MIN
32720#undef LONG_MAX
32721#undef ULONG_MAX
32722#undef CHAR_BIT
32723#undef CHAR_MIN
32724#undef CHAR_MAX
32725#define SCHAR_MAX __SCHAR_MAX__
32726#define SHRT_MAX __SHRT_MAX__
32727#define INT_MAX __INT_MAX__
32728#define LONG_MAX __LONG_MAX__
32729#define SCHAR_MIN (-__SCHAR_MAX__-1)
32730#define SHRT_MIN (-__SHRT_MAX__ -1)
32731#define INT_MIN (-__INT_MAX__ -1)
32732#define LONG_MIN (-__LONG_MAX__ -1L)
32733#define UCHAR_MAX (__SCHAR_MAX__*2 +1)
32734#define USHRT_MAX (__SHRT_MAX__ *2 +1)
32735#define UINT_MAX (__INT_MAX__ *2U +1U)
32736#define ULONG_MAX (__LONG_MAX__ *2UL+1UL)
32737#define CHAR_BIT __CHAR_BIT__
32738#define CHAR_MIN SCHAR_MIN
32739#define CHAR_MAX __SCHAR_MAX__
32740#undef LLONG_MIN
32741#undef LLONG_MAX
32742#undef ULLONG_MAX
32743#define LLONG_MAX __LONG_LONG_MAX__
32744#define LLONG_MIN (-__LONG_LONG_MAX__-1LL)
32745#define ULLONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL)
32746#undef LONG_LONG_MIN
32747#undef LONG_LONG_MAX
32748#undef ULONG_LONG_MAX
32749#define LONG_LONG_MAX __LONG_LONG_MAX__
32750#define LONG_LONG_MIN (-__LONG_LONG_MAX__-1LL)
32751#define ULONG_LONG_MAX (__LONG_LONG_MAX__*2ULL+1ULL)
32752#define SIGNED_VALUE long
32753#define SIZEOF_VALUE SIZEOF_LONG
32754#define PRI_VALUE_PREFIX "l"
32755#define RBIMPL_VALUE_NULL 0UL
32756#define RBIMPL_VALUE_ONE 1UL
32757#define RBIMPL_VALUE_FULL ULONG_MAX
32758#pragma clang diagnostic push
32759#pragma clang diagnostic ignored "-Wc++11-long-long"
32760#pragma clang diagnostic pop
32761#pragma GCC visibility push(default)
32762#pragma GCC visibility pop
32763#define RBIMPL_INTERN_VM_H
32764#pragma GCC visibility push(default)
32765#define HAVE_RB_DEFINE_ALLOC_FUNC 1
32766#pragma GCC visibility pop
32767#define RBIMPL_METHOD_H
32768#pragma GCC visibility push(default)
32769#pragma GCC visibility pop
32770#define RBIMPL_CFUNC_IS_rb_f_notimplement(f) __builtin_types_compatible_p( __typeof__(f), __typeof__(rb_f_notimplement))
32771#define RBIMPL_ANYARGS_DISPATCH(expr,truthy,falsy) __builtin_choose_expr( __builtin_choose_expr( __builtin_constant_p(expr), (expr), 0), (truthy), (falsy))
32772#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_singleton_method_m2, rb_define_singleton_method_m3)
32773#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_singleton_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m2(n))
32774#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_singleton_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_m1(n))
32775#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_singleton_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_00(n))
32776#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_singleton_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_01(n))
32777#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_singleton_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_02(n))
32778#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_singleton_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_03(n))
32779#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_singleton_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_04(n))
32780#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_singleton_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_05(n))
32781#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_singleton_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_06(n))
32782#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_singleton_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_07(n))
32783#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_singleton_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_08(n))
32784#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_singleton_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_09(n))
32785#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_singleton_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_10(n))
32786#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_singleton_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_11(n))
32787#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_singleton_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_12(n))
32788#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_singleton_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_13(n))
32789#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_singleton_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_14(n))
32790#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_protected_method_m2, rb_define_protected_method_m3)
32791#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_protected_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m2(n))
32792#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_protected_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_m1(n))
32793#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_protected_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_00(n))
32794#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_protected_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_01(n))
32795#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_protected_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_02(n))
32796#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_protected_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_03(n))
32797#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_protected_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_04(n))
32798#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_protected_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_05(n))
32799#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_protected_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_06(n))
32800#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_protected_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_07(n))
32801#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_protected_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_08(n))
32802#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_protected_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_09(n))
32803#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_protected_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_10(n))
32804#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_protected_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_11(n))
32805#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_protected_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_12(n))
32806#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_protected_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_13(n))
32807#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_protected_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_14(n))
32808#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_private_method_m2, rb_define_private_method_m3)
32809#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_private_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m2(n))
32810#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_private_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_m1(n))
32811#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_private_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_00(n))
32812#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_private_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_01(n))
32813#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_private_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_02(n))
32814#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_private_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_03(n))
32815#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_private_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_04(n))
32816#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_private_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_05(n))
32817#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_private_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_06(n))
32818#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_private_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_07(n))
32819#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_private_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_08(n))
32820#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_private_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_09(n))
32821#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_private_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_10(n))
32822#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_private_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_11(n))
32823#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_private_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_12(n))
32824#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_private_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_13(n))
32825#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_private_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_14(n))
32826#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_module_function_m2, rb_define_module_function_m3)
32827#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_module_function_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m2(n))
32828#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_module_function_00, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_m1(n))
32829#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_module_function_01, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_00(n))
32830#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_module_function_02, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_01(n))
32831#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_module_function_03, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_02(n))
32832#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_module_function_04, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_03(n))
32833#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_module_function_05, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_04(n))
32834#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_module_function_06, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_05(n))
32835#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_module_function_07, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_06(n))
32836#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_module_function_08, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_07(n))
32837#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_module_function_09, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_08(n))
32838#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_module_function_10, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_09(n))
32839#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_module_function_11, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_10(n))
32840#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_module_function_12, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_11(n))
32841#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_module_function_13, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_12(n))
32842#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_module_function_14, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_13(n))
32843#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_module_function_15, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_14(n))
32844#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_global_function_m2, rb_define_global_function_m3)
32845#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_global_function_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m2(n))
32846#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_global_function_00, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_m1(n))
32847#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_global_function_01, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_00(n))
32848#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_global_function_02, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_01(n))
32849#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_global_function_03, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_02(n))
32850#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_global_function_04, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_03(n))
32851#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_global_function_05, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_04(n))
32852#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_global_function_06, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_05(n))
32853#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_global_function_07, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_06(n))
32854#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_global_function_08, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_07(n))
32855#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_global_function_09, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_08(n))
32856#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_global_function_10, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_09(n))
32857#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_global_function_11, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_10(n))
32858#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_global_function_12, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_11(n))
32859#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_global_function_13, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_12(n))
32860#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_global_function_14, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_13(n))
32861#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_global_function_15, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_14(n))
32862#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_method_id_m2, rb_define_method_id_m3)
32863#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_method_id_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m2(n))
32864#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_method_id_00, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_m1(n))
32865#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_method_id_01, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_00(n))
32866#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_method_id_02, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_01(n))
32867#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_method_id_03, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_02(n))
32868#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_method_id_04, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_03(n))
32869#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_method_id_05, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_04(n))
32870#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_method_id_06, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_05(n))
32871#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_method_id_07, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_06(n))
32872#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_method_id_08, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_07(n))
32873#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_method_id_09, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_08(n))
32874#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_method_id_10, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_09(n))
32875#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_method_id_11, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_10(n))
32876#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_method_id_12, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_11(n))
32877#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_method_id_13, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_12(n))
32878#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_method_id_14, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_13(n))
32879#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_method_id_15, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_14(n))
32880#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_m2(n) RBIMPL_ANYARGS_DISPATCH((n) == -2, rb_define_method_m2, rb_define_method_m3)
32881#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_m1(n) RBIMPL_ANYARGS_DISPATCH((n) == -1, rb_define_method_m1, RBIMPL_ANYARGS_DISPATCH_rb_define_method_m2(n))
32882#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_00(n) RBIMPL_ANYARGS_DISPATCH((n) == 0, rb_define_method_00, RBIMPL_ANYARGS_DISPATCH_rb_define_method_m1(n))
32883#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_01(n) RBIMPL_ANYARGS_DISPATCH((n) == 1, rb_define_method_01, RBIMPL_ANYARGS_DISPATCH_rb_define_method_00(n))
32884#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_02(n) RBIMPL_ANYARGS_DISPATCH((n) == 2, rb_define_method_02, RBIMPL_ANYARGS_DISPATCH_rb_define_method_01(n))
32885#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_03(n) RBIMPL_ANYARGS_DISPATCH((n) == 3, rb_define_method_03, RBIMPL_ANYARGS_DISPATCH_rb_define_method_02(n))
32886#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_04(n) RBIMPL_ANYARGS_DISPATCH((n) == 4, rb_define_method_04, RBIMPL_ANYARGS_DISPATCH_rb_define_method_03(n))
32887#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_05(n) RBIMPL_ANYARGS_DISPATCH((n) == 5, rb_define_method_05, RBIMPL_ANYARGS_DISPATCH_rb_define_method_04(n))
32888#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_06(n) RBIMPL_ANYARGS_DISPATCH((n) == 6, rb_define_method_06, RBIMPL_ANYARGS_DISPATCH_rb_define_method_05(n))
32889#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_07(n) RBIMPL_ANYARGS_DISPATCH((n) == 7, rb_define_method_07, RBIMPL_ANYARGS_DISPATCH_rb_define_method_06(n))
32890#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_08(n) RBIMPL_ANYARGS_DISPATCH((n) == 8, rb_define_method_08, RBIMPL_ANYARGS_DISPATCH_rb_define_method_07(n))
32891#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_09(n) RBIMPL_ANYARGS_DISPATCH((n) == 9, rb_define_method_09, RBIMPL_ANYARGS_DISPATCH_rb_define_method_08(n))
32892#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_10(n) RBIMPL_ANYARGS_DISPATCH((n) == 10, rb_define_method_10, RBIMPL_ANYARGS_DISPATCH_rb_define_method_09(n))
32893#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_11(n) RBIMPL_ANYARGS_DISPATCH((n) == 11, rb_define_method_11, RBIMPL_ANYARGS_DISPATCH_rb_define_method_10(n))
32894#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_12(n) RBIMPL_ANYARGS_DISPATCH((n) == 12, rb_define_method_12, RBIMPL_ANYARGS_DISPATCH_rb_define_method_11(n))
32895#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_13(n) RBIMPL_ANYARGS_DISPATCH((n) == 13, rb_define_method_13, RBIMPL_ANYARGS_DISPATCH_rb_define_method_12(n))
32896#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_14(n) RBIMPL_ANYARGS_DISPATCH((n) == 14, rb_define_method_14, RBIMPL_ANYARGS_DISPATCH_rb_define_method_13(n))
32897#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_15(n) RBIMPL_ANYARGS_DISPATCH((n) == 15, rb_define_method_15, RBIMPL_ANYARGS_DISPATCH_rb_define_method_14(n))
32898#define RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_singleton_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method_15(n))
32899#define RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_protected_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method_15(n))
32900#define RBIMPL_ANYARGS_DISPATCH_rb_define_private_method(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_private_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_private_method_15(n))
32901#define RBIMPL_ANYARGS_DISPATCH_rb_define_module_function(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_module_function_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_module_function_15(n))
32902#define RBIMPL_ANYARGS_DISPATCH_rb_define_global_function(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_global_function_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_global_function_15(n))
32903#define RBIMPL_ANYARGS_DISPATCH_rb_define_method_id(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_method_id_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_method_id_15(n))
32904#define RBIMPL_ANYARGS_DISPATCH_rb_define_method(n,f) RBIMPL_ANYARGS_DISPATCH(RBIMPL_CFUNC_IS_rb_f_notimplement(f), rb_define_method_m3, RBIMPL_ANYARGS_DISPATCH_rb_define_method_15(n))
32905#define RBIMPL_ANYARGS_ATTRSET(sym) RBIMPL_ATTR_MAYBE_UNUSED() RBIMPL_ATTR_NONNULL() RBIMPL_ATTR_WEAKREF(sym)
32906#define RBIMPL_ANYARGS_DECL(sym,...) RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m3(__VA_ARGS__, VALUE(*)(ANYARGS), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m2(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _m1(__VA_ARGS__, VALUE(*)(int, union { VALUE *x; const VALUE *y; } __attribute__((__transparent_union__)), VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _00(__VA_ARGS__, VALUE(*)(VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _01(__VA_ARGS__, VALUE(*)(VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _02(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _03(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _04(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _05(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _06(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _07(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _08(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _09(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _10(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _11(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _12(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _13(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _14(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int); RBIMPL_ANYARGS_ATTRSET(sym) static void sym ## _15(__VA_ARGS__, VALUE(*)(VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE, VALUE), int);
32907#define rb_define_method(klass,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_method((arity), (func))((klass), (mid), (func), (arity))
32908#define rb_define_method_id(klass,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_method_id((arity), (func))((klass), (mid), (func), (arity))
32909#define rb_define_singleton_method(obj,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_singleton_method((arity), (func))((obj), (mid), (func), (arity))
32910#define rb_define_protected_method(klass,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_protected_method((arity), (func))((klass), (mid), (func), (arity))
32911#define rb_define_private_method(klass,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_private_method((arity), (func))((klass), (mid), (func), (arity))
32912#define rb_define_module_function(mod,mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_module_function((arity), (func))((mod), (mid), (func), (arity))
32913#define rb_define_global_function(mid,func,arity) RBIMPL_ANYARGS_DISPATCH_rb_define_global_function((arity), (func))((mid), (func), (arity))
32914#define RUBY_METHOD_FUNC(func) (func)
32915#define RBIMPL_ARITHMETIC_H
32916#define RBIMPL_ARITHMETIC_CHAR_H
32917#define RBIMPL_ARITHMETIC_INT_H
32918#define RBIMPL_ARITHMETIC_FIXNUM_H
32919#define FIXABLE RB_FIXABLE
32920#define FIXNUM_MAX RUBY_FIXNUM_MAX
32921#define FIXNUM_MIN RUBY_FIXNUM_MIN
32922#define NEGFIXABLE RB_NEGFIXABLE
32923#define POSFIXABLE RB_POSFIXABLE
32924#define RB_POSFIXABLE(_) ((_) < RUBY_FIXNUM_MAX + 1)
32925#define RB_NEGFIXABLE(_) ((_) >= RUBY_FIXNUM_MIN)
32926#define RB_FIXABLE(_) (RB_POSFIXABLE(_) && RB_NEGFIXABLE(_))
32927#define RUBY_FIXNUM_MAX (LONG_MAX / 2)
32928#define RUBY_FIXNUM_MIN (LONG_MIN / 2)
32929#define RBIMPL_ARITHMETIC_INTPTR_T_H
32930#define rb_int_new rb_int2inum
32931#define rb_uint_new rb_uint2inum
32932#pragma GCC visibility push(default)
32933#pragma GCC visibility pop
32934#define RBIMPL_ARITHMETIC_LONG_H
32935#define RBIMPL_ATTR_ARTIFICIAL_H
32936#define RBIMPL_ATTR_ARTIFICIAL() __attribute__((__artificial__))
32937#define RBIMPL_ATTR_CONSTEXPR_H
32938#define RBIMPL_HAS_ATTR_CONSTEXPR_CXX11 0
32939#define RBIMPL_HAS_ATTR_CONSTEXPR_CXX14 0
32940#define RBIMPL_ATTR_CONSTEXPR(_)
32941#define RBIMPL_ATTR_CONSTEXPR_UNLESS_DEBUG(_) RBIMPL_ATTR_CONSTEXPR(_)
32942#define RBIMPL_SPECIAL_CONSTS_H
32943#define RBIMPL_ATTR_ENUM_EXTENSIBILITY_H
32944#define RBIMPL_ATTR_ENUM_EXTENSIBILITY(_) __attribute__((__enum_extensibility__(_)))
32945#define USE_FLONUM 1
32946#define RTEST RB_TEST
32947#define FIXNUM_P RB_FIXNUM_P
32948#define IMMEDIATE_P RB_IMMEDIATE_P
32949#define NIL_P RB_NIL_P
32950#define SPECIAL_CONST_P RB_SPECIAL_CONST_P
32951#define STATIC_SYM_P RB_STATIC_SYM_P
32952#define Qfalse RUBY_Qfalse
32953#define Qnil RUBY_Qnil
32954#define Qtrue RUBY_Qtrue
32955#define Qundef RUBY_Qundef
32956#define FIXNUM_FLAG RUBY_FIXNUM_FLAG
32957#define FLONUM_FLAG RUBY_FLONUM_FLAG
32958#define FLONUM_MASK RUBY_FLONUM_MASK
32959#define FLONUM_P RB_FLONUM_P
32960#define IMMEDIATE_MASK RUBY_IMMEDIATE_MASK
32961#define SYMBOL_FLAG RUBY_SYMBOL_FLAG
32962#define RB_FIXNUM_P RB_FIXNUM_P
32963#define RB_FLONUM_P RB_FLONUM_P
32964#define RB_IMMEDIATE_P RB_IMMEDIATE_P
32965#define RB_NIL_P RB_NIL_P
32966#define RB_SPECIAL_CONST_P RB_SPECIAL_CONST_P
32967#define RB_STATIC_SYM_P RB_STATIC_SYM_P
32968#define RB_TEST RB_TEST
32969#define RUBY_Qfalse RBIMPL_CAST((VALUE)RUBY_Qfalse)
32970#define RUBY_Qtrue RBIMPL_CAST((VALUE)RUBY_Qtrue)
32971#define RUBY_Qnil RBIMPL_CAST((VALUE)RUBY_Qnil)
32972#define RUBY_Qundef RBIMPL_CAST((VALUE)RUBY_Qundef)
32973#define FIX2LONG RB_FIX2LONG
32974#define FIX2ULONG RB_FIX2ULONG
32975#define INT2FIX RB_INT2FIX
32976#define LONG2FIX RB_INT2FIX
32977#define LONG2NUM RB_LONG2NUM
32978#define NUM2LONG RB_NUM2LONG
32979#define NUM2ULONG RB_NUM2ULONG
32980#define RB_FIX2LONG rb_fix2long
32981#define RB_FIX2ULONG rb_fix2ulong
32982#define RB_LONG2FIX RB_INT2FIX
32983#define RB_LONG2NUM rb_long2num_inline
32984#define RB_NUM2LONG rb_num2long_inline
32985#define RB_NUM2ULONG rb_num2ulong_inline
32986#define RB_ULONG2NUM rb_ulong2num_inline
32987#define ULONG2NUM RB_ULONG2NUM
32988#define rb_fix_new RB_INT2FIX
32989#define rb_long2int rb_long2int_inline
32990#define RB_INT2FIX RB_INT2FIX
32991#pragma GCC visibility push(default)
32992#pragma GCC visibility pop
32993#undef INT2FIX
32994#define INT2FIX(i) __builtin_choose_expr( __builtin_constant_p(i), RBIMPL_CAST((VALUE)(i)) << 1 | RUBY_FIXNUM_FLAG, RB_INT2FIX(i))
32995#define RB_INT2NUM rb_int2num_inline
32996#define RB_NUM2INT rb_num2int_inline
32997#define RB_UINT2NUM rb_uint2num_inline
32998#define FIX2INT RB_FIX2INT
32999#define FIX2UINT RB_FIX2UINT
33000#define INT2NUM RB_INT2NUM
33001#define NUM2INT RB_NUM2INT
33002#define NUM2UINT RB_NUM2UINT
33003#define UINT2NUM RB_UINT2NUM
33004#define RB_FIX2INT RB_FIX2INT
33005#define RB_NUM2UINT RB_NUM2UINT
33006#define RB_FIX2UINT RB_FIX2UINT
33007#pragma GCC visibility push(default)
33008#pragma GCC visibility pop
33009#pragma clang diagnostic push
33010#pragma clang diagnostic ignored "-Wtautological-constant-out-of-range-compare"
33011#pragma clang diagnostic pop
33012#define RBIMPL_RSTRING_H
33013#define RBIMPL_RBASIC_H
33014#define RBIMPL_ATTR_NOALIAS_H
33015#define RBIMPL_ATTR_NOALIAS() __declspec(noalias)
33016#define RBASIC(obj) RBIMPL_CAST((struct RBasic *)(obj))
33017#define RBASIC_CLASS RBASIC_CLASS
33018#define RVALUE_EMBED_LEN_MAX RVALUE_EMBED_LEN_MAX
33019#define RBIMPL_EMBED_LEN_MAX_OF(T) RBIMPL_CAST((int)(sizeof(VALUE[RVALUE_EMBED_LEN_MAX]) / sizeof(T)))
33020#pragma GCC visibility push(default)
33021#pragma GCC visibility pop
33022#define RBIMPL_FL_TYPE_H
33023#define RBIMPL_ATTR_FLAG_ENUM_H
33024#define RBIMPL_ATTR_FLAG_ENUM() __attribute__((__flag_enum__))
33025#define RBIMPL_VALUE_TYPE_H
33026#define RBIMPL_CONSTANT_P_H
33027#define RBIMPL_CONSTANT_P(expr) __builtin_constant_p(expr)
33028#define T_ARRAY RUBY_T_ARRAY
33029#define T_BIGNUM RUBY_T_BIGNUM
33030#define T_CLASS RUBY_T_CLASS
33031#define T_COMPLEX RUBY_T_COMPLEX
33032#define T_DATA RUBY_T_DATA
33033#define T_FALSE RUBY_T_FALSE
33034#define T_FILE RUBY_T_FILE
33035#define T_FIXNUM RUBY_T_FIXNUM
33036#define T_FLOAT RUBY_T_FLOAT
33037#define T_HASH RUBY_T_HASH
33038#define T_ICLASS RUBY_T_ICLASS
33039#define T_IMEMO RUBY_T_IMEMO
33040#define T_MASK RUBY_T_MASK
33041#define T_MATCH RUBY_T_MATCH
33042#define T_MODULE RUBY_T_MODULE
33043#define T_MOVED RUBY_T_MOVED
33044#define T_NIL RUBY_T_NIL
33045#define T_NODE RUBY_T_NODE
33046#define T_NONE RUBY_T_NONE
33047#define T_OBJECT RUBY_T_OBJECT
33048#define T_RATIONAL RUBY_T_RATIONAL
33049#define T_REGEXP RUBY_T_REGEXP
33050#define T_STRING RUBY_T_STRING
33051#define T_STRUCT RUBY_T_STRUCT
33052#define T_SYMBOL RUBY_T_SYMBOL
33053#define T_TRUE RUBY_T_TRUE
33054#define T_UNDEF RUBY_T_UNDEF
33055#define T_ZOMBIE RUBY_T_ZOMBIE
33056#define BUILTIN_TYPE RB_BUILTIN_TYPE
33057#define DYNAMIC_SYM_P RB_DYNAMIC_SYM_P
33058#define RB_INTEGER_TYPE_P rb_integer_type_p
33059#define SYMBOL_P RB_SYMBOL_P
33060#define rb_type_p RB_TYPE_P
33061#define RB_BUILTIN_TYPE RB_BUILTIN_TYPE
33062#define RB_DYNAMIC_SYM_P RB_DYNAMIC_SYM_P
33063#define RB_FLOAT_TYPE_P RB_FLOAT_TYPE_P
33064#define RB_SYMBOL_P RB_SYMBOL_P
33065#define RB_TYPE_P RB_TYPE_P
33066#define Check_Type Check_Type
33067#define RBIMPL_ASSERT_TYPE(v,t) RBIMPL_ASSERT_OR_ASSUME(RB_TYPE_P((v), (t)))
33068#define TYPE(_) RBIMPL_CAST((int)rb_type(_))
33069#pragma GCC visibility push(default)
33070#pragma GCC visibility pop
33071#undef RB_TYPE_P
33072#define RB_TYPE_P(obj,t) (RBIMPL_CONSTANT_P(t) ? rbimpl_RB_TYPE_P_fastpath((obj), (t)) : (RB_TYPE_P)((obj), (t)))
33073#define RBIMPL_WIDER_ENUM 1
33074#define FL_SINGLETON RBIMPL_CAST((VALUE)RUBY_FL_SINGLETON)
33075#define FL_WB_PROTECTED RBIMPL_CAST((VALUE)RUBY_FL_WB_PROTECTED)
33076#define FL_PROMOTED0 RBIMPL_CAST((VALUE)RUBY_FL_PROMOTED0)
33077#define FL_PROMOTED1 RBIMPL_CAST((VALUE)RUBY_FL_PROMOTED1)
33078#define FL_FINALIZE RBIMPL_CAST((VALUE)RUBY_FL_FINALIZE)
33079#define FL_TAINT RBIMPL_CAST((VALUE)RUBY_FL_TAINT)
33080#define FL_UNTRUSTED RBIMPL_CAST((VALUE)RUBY_FL_UNTRUSTED)
33081#define FL_SEEN_OBJ_ID RBIMPL_CAST((VALUE)RUBY_FL_SEEN_OBJ_ID)
33082#define FL_EXIVAR RBIMPL_CAST((VALUE)RUBY_FL_EXIVAR)
33083#define FL_FREEZE RBIMPL_CAST((VALUE)RUBY_FL_FREEZE)
33084#define FL_USHIFT RBIMPL_CAST((VALUE)RUBY_FL_USHIFT)
33085#define FL_USER0 RBIMPL_CAST((VALUE)RUBY_FL_USER0)
33086#define FL_USER1 RBIMPL_CAST((VALUE)RUBY_FL_USER1)
33087#define FL_USER2 RBIMPL_CAST((VALUE)RUBY_FL_USER2)
33088#define FL_USER3 RBIMPL_CAST((VALUE)RUBY_FL_USER3)
33089#define FL_USER4 RBIMPL_CAST((VALUE)RUBY_FL_USER4)
33090#define FL_USER5 RBIMPL_CAST((VALUE)RUBY_FL_USER5)
33091#define FL_USER6 RBIMPL_CAST((VALUE)RUBY_FL_USER6)
33092#define FL_USER7 RBIMPL_CAST((VALUE)RUBY_FL_USER7)
33093#define FL_USER8 RBIMPL_CAST((VALUE)RUBY_FL_USER8)
33094#define FL_USER9 RBIMPL_CAST((VALUE)RUBY_FL_USER9)
33095#define FL_USER10 RBIMPL_CAST((VALUE)RUBY_FL_USER10)
33096#define FL_USER11 RBIMPL_CAST((VALUE)RUBY_FL_USER11)
33097#define FL_USER12 RBIMPL_CAST((VALUE)RUBY_FL_USER12)
33098#define FL_USER13 RBIMPL_CAST((VALUE)RUBY_FL_USER13)
33099#define FL_USER14 RBIMPL_CAST((VALUE)RUBY_FL_USER14)
33100#define FL_USER15 RBIMPL_CAST((VALUE)RUBY_FL_USER15)
33101#define FL_USER16 RBIMPL_CAST((VALUE)RUBY_FL_USER16)
33102#define FL_USER17 RBIMPL_CAST((VALUE)RUBY_FL_USER17)
33103#define FL_USER18 RBIMPL_CAST((VALUE)RUBY_FL_USER18)
33104#define FL_USER19 RBIMPL_CAST((VALUE)(unsigned int)RUBY_FL_USER19)
33105#define ELTS_SHARED RUBY_ELTS_SHARED
33106#define RUBY_ELTS_SHARED RUBY_ELTS_SHARED
33107#define RB_OBJ_FREEZE rb_obj_freeze_inline
33108#define RB_FL_ABLE RB_FL_ABLE
33109#define RB_FL_ALL RB_FL_ALL
33110#define RB_FL_ALL_RAW RB_FL_ALL_RAW
33111#define RB_FL_ANY RB_FL_ANY
33112#define RB_FL_ANY_RAW RB_FL_ANY_RAW
33113#define RB_FL_REVERSE RB_FL_REVERSE
33114#define RB_FL_REVERSE_RAW RB_FL_REVERSE_RAW
33115#define RB_FL_SET RB_FL_SET
33116#define RB_FL_SET_RAW RB_FL_SET_RAW
33117#define RB_FL_TEST RB_FL_TEST
33118#define RB_FL_TEST_RAW RB_FL_TEST_RAW
33119#define RB_FL_UNSET RB_FL_UNSET
33120#define RB_FL_UNSET_RAW RB_FL_UNSET_RAW
33121#define RB_OBJ_FREEZE_RAW RB_OBJ_FREEZE_RAW
33122#define RB_OBJ_FROZEN RB_OBJ_FROZEN
33123#define RB_OBJ_FROZEN_RAW RB_OBJ_FROZEN_RAW
33124#define RB_OBJ_INFECT RB_OBJ_INFECT
33125#define RB_OBJ_INFECT_RAW RB_OBJ_INFECT_RAW
33126#define RB_OBJ_TAINT RB_OBJ_TAINT
33127#define RB_OBJ_TAINTABLE RB_OBJ_TAINTABLE
33128#define RB_OBJ_TAINTED RB_OBJ_TAINTED
33129#define RB_OBJ_TAINTED_RAW RB_OBJ_TAINTED_RAW
33130#define RB_OBJ_TAINT_RAW RB_OBJ_TAINT_RAW
33131#define RB_OBJ_UNTRUST RB_OBJ_UNTRUST
33132#define RB_OBJ_UNTRUSTED RB_OBJ_UNTRUSTED
33133#define FL_ABLE RB_FL_ABLE
33134#define FL_ALL RB_FL_ALL
33135#define FL_ALL_RAW RB_FL_ALL_RAW
33136#define FL_ANY RB_FL_ANY
33137#define FL_ANY_RAW RB_FL_ANY_RAW
33138#define FL_REVERSE RB_FL_REVERSE
33139#define FL_REVERSE_RAW RB_FL_REVERSE_RAW
33140#define FL_SET RB_FL_SET
33141#define FL_SET_RAW RB_FL_SET_RAW
33142#define FL_TEST RB_FL_TEST
33143#define FL_TEST_RAW RB_FL_TEST_RAW
33144#define FL_UNSET RB_FL_UNSET
33145#define FL_UNSET_RAW RB_FL_UNSET_RAW
33146#define OBJ_FREEZE RB_OBJ_FREEZE
33147#define OBJ_FREEZE_RAW RB_OBJ_FREEZE_RAW
33148#define OBJ_FROZEN RB_OBJ_FROZEN
33149#define OBJ_FROZEN_RAW RB_OBJ_FROZEN_RAW
33150#define OBJ_INFECT RB_OBJ_INFECT
33151#define OBJ_INFECT_RAW RB_OBJ_INFECT_RAW
33152#define OBJ_TAINT RB_OBJ_TAINT
33153#define OBJ_TAINTABLE RB_OBJ_TAINTABLE
33154#define OBJ_TAINTED RB_OBJ_TAINTED
33155#define OBJ_TAINTED_RAW RB_OBJ_TAINTED_RAW
33156#define OBJ_TAINT_RAW RB_OBJ_TAINT_RAW
33157#define OBJ_UNTRUST RB_OBJ_UNTRUST
33158#define OBJ_UNTRUSTED RB_OBJ_UNTRUSTED
33159#define RBIMPL_FL_USER_N(n) RUBY_FL_USER##n = (1<<(RUBY_FL_USHIFT+n))
33160#undef RBIMPL_FL_USER_N
33161#undef RBIMPL_WIDER_ENUM
33162#pragma GCC visibility push(default)
33163#pragma GCC visibility pop
33164#define RSTRING(obj) RBIMPL_CAST((struct RString *)(obj))
33165#define RSTRING_NOEMBED RSTRING_NOEMBED
33166#define RSTRING_EMBED_LEN_MASK RSTRING_EMBED_LEN_MASK
33167#define RSTRING_EMBED_LEN_SHIFT RSTRING_EMBED_LEN_SHIFT
33168#define RSTRING_EMBED_LEN_MAX RSTRING_EMBED_LEN_MAX
33169#define RSTRING_FSTR RSTRING_FSTR
33170#define RSTRING_EMBED_LEN RSTRING_EMBED_LEN
33171#define RSTRING_LEN RSTRING_LEN
33172#define RSTRING_LENINT RSTRING_LENINT
33173#define RSTRING_PTR RSTRING_PTR
33174#define RSTRING_END RSTRING_END
33175#define StringValue(v) rb_string_value(&(v))
33176#define StringValuePtr(v) rb_string_value_ptr(&(v))
33177#define StringValueCStr(v) rb_string_value_cstr(&(v))
33178#define SafeStringValue(v) StringValue(v)
33179#define ExportStringValue(v) do { StringValue(v); (v) = rb_str_export(v); } while (0)
33180#pragma GCC visibility push(default)
33181#define Check_SafeStr(v) rb_check_safe_str(RBIMPL_CAST((VALUE)(v)))
33182#pragma GCC visibility pop
33183#pragma clang diagnostic push
33184#pragma clang diagnostic pop
33185#define RSTRING_GETMEM(str,ptrvar,lenvar) __extension__ ({ struct RString rbimpl_str = rbimpl_rstring_getmem(str); (ptrvar) = rbimpl_str.as.heap.ptr; (lenvar) = rbimpl_str.as.heap.len; })
33186#define RB_NUM2CHR rb_num2char_inline
33187#define NUM2CHR RB_NUM2CHR
33188#define CHR2FIX RB_CHR2FIX
33189#define RB_CHR2FIX RB_CHR2FIX
33190#define RBIMPL_ARITHMETIC_DOUBLE_H
33191#define NUM2DBL rb_num2dbl
33192#define RFLOAT_VALUE rb_float_value
33193#define DBL2NUM rb_float_new
33194#pragma GCC visibility push(default)
33195#pragma GCC visibility pop
33196#define RBIMPL_ARITHMETIC_GID_T_H
33197#define RBIMPL_ARITHMETIC_LONG_LONG_H
33198#define RB_LL2NUM rb_ll2inum
33199#define RB_ULL2NUM rb_ull2inum
33200#define LL2NUM RB_LL2NUM
33201#define ULL2NUM RB_ULL2NUM
33202#define RB_NUM2LL rb_num2ll_inline
33203#define RB_NUM2ULL rb_num2ull
33204#define NUM2LL RB_NUM2LL
33205#define NUM2ULL RB_NUM2ULL
33206#pragma GCC visibility push(default)
33207#pragma clang diagnostic push
33208#pragma clang diagnostic ignored "-Wc++11-long-long"
33209#pragma clang diagnostic pop
33210#pragma clang diagnostic push
33211#pragma clang diagnostic ignored "-Wc++11-long-long"
33212#pragma clang diagnostic pop
33213#pragma clang diagnostic push
33214#pragma clang diagnostic ignored "-Wc++11-long-long"
33215#pragma clang diagnostic pop
33216#pragma clang diagnostic push
33217#pragma clang diagnostic ignored "-Wc++11-long-long"
33218#pragma clang diagnostic pop
33219#pragma GCC visibility pop
33220#pragma clang diagnostic push
33221#pragma clang diagnostic ignored "-Wc++11-long-long"
33222#pragma clang diagnostic pop
33223#define RBIMPL_ARITHMETIC_MODE_T_H
33224#define RBIMPL_ARITHMETIC_OFF_T_H
33225#define RBIMPL_ARITHMETIC_PID_T_H
33226#define RBIMPL_ARITHMETIC_SHORT_H
33227#define RB_NUM2SHORT rb_num2short_inline
33228#define RB_NUM2USHORT rb_num2ushort
33229#define NUM2SHORT RB_NUM2SHORT
33230#define NUM2USHORT RB_NUM2USHORT
33231#define USHORT2NUM RB_INT2FIX
33232#define RB_FIX2SHORT rb_fix2short
33233#define FIX2SHORT RB_FIX2SHORT
33234#pragma GCC visibility push(default)
33235#pragma GCC visibility pop
33236#define RBIMPL_ARITHMETIC_SIZE_T_H
33237#define SIZET2NUM RB_ULL2NUM
33238#define SSIZET2NUM RB_LL2NUM
33239#define NUM2SIZET RB_NUM2ULL
33240#define NUM2SSIZET RB_NUM2LL
33241#define RBIMPL_ARITHMERIC_ST_DATA_T_H
33242#define RUBY_ST_H 1
33243#pragma GCC visibility push(default)
33244#define ST_DATA_T_DEFINED
33245#define MAX_ST_INDEX_VAL (~(st_index_t) 0)
33246#define SIZEOF_ST_INDEX_T SIZEOF_VOIDP
33247#define ST_INDEX_BITS (SIZEOF_ST_INDEX_T * CHAR_BIT)
33248#define ST_DATA_COMPATIBLE_P(type) __builtin_choose_expr(__builtin_types_compatible_p(type, st_data_t), 1, 0)
33249#define st_is_member(table,key) st_lookup((table),(key),(st_data_t *)0)
33250#define st_init_table rb_st_init_table
33251#define st_init_table_with_size rb_st_init_table_with_size
33252#define st_init_numtable rb_st_init_numtable
33253#define st_init_numtable_with_size rb_st_init_numtable_with_size
33254#define st_init_strtable rb_st_init_strtable
33255#define st_init_strtable_with_size rb_st_init_strtable_with_size
33256#define st_init_strcasetable rb_st_init_strcasetable
33257#define st_init_strcasetable_with_size rb_st_init_strcasetable_with_size
33258#define st_delete rb_st_delete
33259#define st_delete_safe rb_st_delete_safe
33260#define st_shift rb_st_shift
33261#define st_insert rb_st_insert
33262#define st_insert2 rb_st_insert2
33263#define st_lookup rb_st_lookup
33264#define st_get_key rb_st_get_key
33265#define st_update rb_st_update
33266#define st_foreach_with_replace rb_st_foreach_with_replace
33267#define st_foreach rb_st_foreach
33268#define st_foreach_check rb_st_foreach_check
33269#define st_keys rb_st_keys
33270#define st_keys_check rb_st_keys_check
33271#define st_values rb_st_values
33272#define st_values_check rb_st_values_check
33273#define st_add_direct rb_st_add_direct
33274#define st_free_table rb_st_free_table
33275#define st_cleanup_safe rb_st_cleanup_safe
33276#define st_clear rb_st_clear
33277#define st_copy rb_st_copy
33278#define st_numcmp rb_st_numcmp
33279#define st_numhash rb_st_numhash
33280#define st_locale_insensitive_strcasecmp rb_st_locale_insensitive_strcasecmp
33281#define st_locale_insensitive_strncasecmp rb_st_locale_insensitive_strncasecmp
33282#define st_strcasecmp rb_st_locale_insensitive_strcasecmp
33283#define st_strncasecmp rb_st_locale_insensitive_strncasecmp
33284#define st_memsize rb_st_memsize
33285#define st_hash rb_st_hash
33286#define st_hash_uint32 rb_st_hash_uint32
33287#define st_hash_uint rb_st_hash_uint
33288#define st_hash_end rb_st_hash_end
33289#define st_hash_start(h) ((st_index_t)(h))
33290#pragma GCC visibility pop
33291#define ST2FIX RB_ST2FIX
33292#define RB_ST2FIX RB_ST2FIX
33293#define RBIMPL_ARITHMETIC_UID_T_H
33294#define RBIMPL_CORE_H
33295#define RBIMPL_RARRAY_H
33296#define RBIMPL_RGENGC_H
33297#undef USE_RGENGC
33298#define USE_RGENGC 1
33299#define USE_RINCGC 1
33300#define USE_RGENGC_LOGGING_WB_UNPROTECT 0
33301#define RGENGC_WB_PROTECTED_ARRAY 1
33302#define RGENGC_WB_PROTECTED_HASH 1
33303#define RGENGC_WB_PROTECTED_STRUCT 1
33304#define RGENGC_WB_PROTECTED_STRING 1
33305#define RGENGC_WB_PROTECTED_OBJECT 1
33306#define RGENGC_WB_PROTECTED_REGEXP 1
33307#define RGENGC_WB_PROTECTED_CLASS 1
33308#define RGENGC_WB_PROTECTED_FLOAT 1
33309#define RGENGC_WB_PROTECTED_COMPLEX 1
33310#define RGENGC_WB_PROTECTED_RATIONAL 1
33311#define RGENGC_WB_PROTECTED_BIGNUM 1
33312#define RGENGC_WB_PROTECTED_NODE_CREF 1
33313#define RB_OBJ_WRITE(a,slot,b) RBIMPL_CAST(rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__))
33314#define RB_OBJ_WRITTEN(a,oldv,b) RBIMPL_CAST(rb_obj_written((VALUE)(a), (VALUE)(oldv), (VALUE)(b), __FILE__, __LINE__))
33315#define OBJ_PROMOTED_RAW RB_OBJ_PROMOTED_RAW
33316#define OBJ_PROMOTED RB_OBJ_PROMOTED
33317#define OBJ_WB_UNPROTECT RB_OBJ_WB_UNPROTECT
33318#define RB_OBJ_WB_UNPROTECT(x) rb_obj_wb_unprotect(x, __FILE__, __LINE__)
33319#define RB_OBJ_WB_UNPROTECT_FOR(type,obj) (RGENGC_WB_PROTECTED_##type ? OBJ_WB_UNPROTECT(obj) : obj)
33320#define RGENGC_LOGGING_WB_UNPROTECT rb_gc_unprotect_logging
33321#define RB_OBJ_PROMOTED_RAW RB_OBJ_PROMOTED_RAW
33322#define RB_OBJ_PROMOTED RB_OBJ_PROMOTED
33323#pragma GCC visibility push(default)
33324#pragma GCC visibility pop
33325#define USE_TRANSIENT_HEAP 1
33326#define RARRAY(obj) RBIMPL_CAST((struct RArray *)(obj))
33327#define RARRAY_EMBED_FLAG RARRAY_EMBED_FLAG
33328#define RARRAY_EMBED_LEN_MASK RARRAY_EMBED_LEN_MASK
33329#define RARRAY_EMBED_LEN_MAX RARRAY_EMBED_LEN_MAX
33330#define RARRAY_EMBED_LEN_SHIFT RARRAY_EMBED_LEN_SHIFT
33331#define RARRAY_TRANSIENT_FLAG RARRAY_TRANSIENT_FLAG
33332#define RARRAY_LEN rb_array_len
33333#define RARRAY_CONST_PTR rb_array_const_ptr
33334#define RARRAY_CONST_PTR_TRANSIENT rb_array_const_ptr_transient
33335#define FIX_CONST_VALUE_PTR(x) (x)
33336#define RARRAY_EMBED_LEN RARRAY_EMBED_LEN
33337#define RARRAY_LENINT RARRAY_LENINT
33338#define RARRAY_TRANSIENT_P RARRAY_TRANSIENT_P
33339#define RARRAY_ASET RARRAY_ASET
33340#define RARRAY_PTR RARRAY_PTR
33341#pragma GCC visibility push(default)
33342#pragma GCC visibility pop
33343#define RBIMPL_RARRAY_STMT(flag,ary,var,expr) do { RBIMPL_ASSERT_TYPE((ary), RUBY_T_ARRAY); const VALUE rbimpl_ary = (ary); VALUE *var = rb_array_ptr_use_start(rbimpl_ary, (flag)); expr; rb_array_ptr_use_end(rbimpl_ary, (flag)); } while (0)
33344#define RARRAY_PTR_USE_START(a) rb_array_ptr_use_start(a, 0)
33345#define RARRAY_PTR_USE_END(a) rb_array_ptr_use_end(a, 0)
33346#define RARRAY_PTR_USE(ary,ptr_name,expr) RBIMPL_RARRAY_STMT(0, ary, ptr_name, expr)
33347#define RARRAY_PTR_USE_START_TRANSIENT(a) rb_array_ptr_use_start(a, 1)
33348#define RARRAY_PTR_USE_END_TRANSIENT(a) rb_array_ptr_use_end(a, 1)
33349#define RARRAY_PTR_USE_TRANSIENT(ary,ptr_name,expr) RBIMPL_RARRAY_STMT(1, ary, ptr_name, expr)
33350#define RARRAY_AREF(a,i) RARRAY_CONST_PTR_TRANSIENT(a)[i]
33351#define RBIMPL_RBIGNUM_H
33352#define RBIGNUM_SIGN rb_big_sign
33353#define RBIGNUM_POSITIVE_P RBIGNUM_POSITIVE_P
33354#define RBIGNUM_NEGATIVE_P RBIGNUM_NEGATIVE_P
33355#pragma GCC visibility push(default)
33356#pragma GCC visibility pop
33357#define RBIMPL_RCLASS_H
33358#define RMODULE_IS_OVERLAID RMODULE_IS_OVERLAID
33359#define RMODULE_IS_REFINEMENT RMODULE_IS_REFINEMENT
33360#define RMODULE_INCLUDED_INTO_REFINEMENT RMODULE_INCLUDED_INTO_REFINEMENT
33361#define RCLASS(obj) RBIMPL_CAST((struct RClass *)(obj))
33362#define RMODULE RCLASS
33363#define RCLASS_SUPER rb_class_get_superclass
33364#pragma GCC visibility push(default)
33365#pragma GCC visibility pop
33366#define RBIMPL_RDATA_H
33367#define RUBY_UNTYPED_DATA_WARNING 1
33368#define RBIMPL_DATA_FUNC(f) RBIMPL_CAST((void (*)(void *))(f))
33369#define RBIMPL_ATTRSET_UNTYPED_DATA_FUNC() RBIMPL_ATTR_WARNING(("untyped Data is unsafe; use TypedData instead")) RBIMPL_ATTR_DEPRECATED(("by TypedData"))
33370#define RDATA(obj) RBIMPL_CAST((struct RData *)(obj))
33371#define DATA_PTR(obj) RDATA(obj)->data
33372#define RUBY_MACRO_SELECT RBIMPL_TOKEN_PASTE
33373#define RUBY_DEFAULT_FREE RBIMPL_DATA_FUNC(-1)
33374#define RUBY_NEVER_FREE RBIMPL_DATA_FUNC(0)
33375#define RUBY_UNTYPED_DATA_FUNC(f) f RBIMPL_ATTRSET_UNTYPED_DATA_FUNC()
33376#pragma GCC visibility push(default)
33377#pragma GCC visibility pop
33378#define Data_Wrap_Struct(klass,mark,free,sval) rb_data_object_wrap( (klass), (sval), RBIMPL_DATA_FUNC(mark), RBIMPL_DATA_FUNC(free))
33379#define Data_Make_Struct0(result,klass,type,size,mark,free,sval) VALUE result = rb_data_object_zalloc( (klass), (size), RBIMPL_DATA_FUNC(mark), RBIMPL_DATA_FUNC(free)); (sval) = RBIMPL_CAST((type *)DATA_PTR(result)); RBIMPL_CAST( (void)(sval))
33380#define Data_Make_Struct(klass,type,mark,free,sval) RB_GNUC_EXTENSION({ Data_Make_Struct0( data_struct_obj, klass, type, sizeof(type), mark, free, sval); data_struct_obj; })
33381#define Data_Get_Struct(obj,type,sval) ((sval) = RBIMPL_CAST((type*)rb_data_object_get(obj)))
33382#define rb_data_object_wrap_warning(klass,ptr,mark,free) RB_GNUC_EXTENSION( __builtin_choose_expr( __builtin_constant_p(klass) && !(klass), rb_data_object_wrap(klass, ptr, mark, free), (rb_data_object_wrap_warning)(klass, ptr, mark, free)))
33383#define rb_data_object_wrap_0 rb_data_object_wrap
33384#define rb_data_object_wrap_1 rb_data_object_wrap_warning
33385#define rb_data_object_wrap RUBY_MACRO_SELECT(rb_data_object_wrap_, RUBY_UNTYPED_DATA_WARNING)
33386#define rb_data_object_get_0 rb_data_object_get
33387#define rb_data_object_get_1 rb_data_object_get_warning
33388#define rb_data_object_get RUBY_MACRO_SELECT(rb_data_object_get_, RUBY_UNTYPED_DATA_WARNING)
33389#define rb_data_object_make_0 rb_data_object_make
33390#define rb_data_object_make_1 rb_data_object_make_warning
33391#define rb_data_object_make RUBY_MACRO_SELECT(rb_data_object_make_, RUBY_UNTYPED_DATA_WARNING)
33392#define RBIMPL_RFILE_H
33393#define RFILE(obj) RBIMPL_CAST((struct RFile *)(obj))
33394#define RBIMPL_RHASH_H
33395#define RHASH_TBL(h) rb_hash_tbl(h, __FILE__, __LINE__)
33396#define RHASH_ITER_LEV(h) rb_hash_iter_lev(h)
33397#define RHASH_IFNONE(h) rb_hash_ifnone(h)
33398#define RHASH_SIZE(h) rb_hash_size_num(h)
33399#define RHASH_EMPTY_P(h) (RHASH_SIZE(h) == 0)
33400#define RHASH_SET_IFNONE(h,ifnone) rb_hash_set_ifnone((VALUE)h, ifnone)
33401#pragma GCC visibility push(default)
33402#pragma GCC visibility pop
33403#define RBIMPL_ROBJECT_H
33404#define ROBJECT(obj) RBIMPL_CAST((struct RObject *)(obj))
33405#define ROBJECT_EMBED_LEN_MAX ROBJECT_EMBED_LEN_MAX
33406#define ROBJECT_EMBED ROBJECT_EMBED
33407#define ROBJECT_NUMIV ROBJECT_NUMIV
33408#define ROBJECT_IVPTR ROBJECT_IVPTR
33409#define ROBJECT_IV_INDEX_TBL ROBJECT_IV_INDEX_TBL
33410#pragma GCC visibility push(default)
33411#pragma GCC visibility pop
33412#define RBIMPL_RREGEXP_H
33413#define RREGEXP(obj) RBIMPL_CAST((struct RRegexp *)(obj))
33414#define RREGEXP_PTR(obj) (RREGEXP(obj)->ptr)
33415#define RREGEXP_SRC RREGEXP_SRC
33416#define RREGEXP_SRC_PTR RREGEXP_SRC_PTR
33417#define RREGEXP_SRC_LEN RREGEXP_SRC_LEN
33418#define RREGEXP_SRC_END RREGEXP_SRC_END
33419#define RBIMPL_RSTRUCT_H
33420#define RSTRUCT_PTR(st) rb_struct_ptr(st)
33421#define RSTRUCT_LEN RSTRUCT_LEN
33422#define RSTRUCT_SET RSTRUCT_SET
33423#define RSTRUCT_GET RSTRUCT_GET
33424#pragma GCC visibility push(default)
33425#pragma GCC visibility pop
33426#define RBIMPL_RTYPEDDATA_H
33427#define RBIMPL_ERROR_H
33428#pragma GCC visibility push(default)
33429#define RB_IO_WAIT_READABLE RB_IO_WAIT_READABLE
33430#define RB_IO_WAIT_WRITABLE RB_IO_WAIT_WRITABLE
33431#define ruby_verbose (*rb_ruby_verbose_ptr())
33432#define ruby_debug (*rb_ruby_debug_ptr())
33433#pragma GCC visibility pop
33434#define HAVE_TYPE_RB_DATA_TYPE_T 1
33435#define HAVE_RB_DATA_TYPE_T_FUNCTION 1
33436#define HAVE_RB_DATA_TYPE_T_PARENT 1
33437#define RUBY_TYPED_DEFAULT_FREE RUBY_DEFAULT_FREE
33438#define RUBY_TYPED_NEVER_FREE RUBY_NEVER_FREE
33439#define RTYPEDDATA(obj) RBIMPL_CAST((struct RTypedData *)(obj))
33440#define RTYPEDDATA_DATA(v) (RTYPEDDATA(v)->data)
33441#define Check_TypedStruct(v,t) rb_check_typeddata(RBIMPL_CAST((VALUE)(v)), (t))
33442#define RTYPEDDATA_P RTYPEDDATA_P
33443#define RTYPEDDATA_TYPE RTYPEDDATA_TYPE
33444#define RUBY_TYPED_FREE_IMMEDIATELY RUBY_TYPED_FREE_IMMEDIATELY
33445#define RUBY_TYPED_WB_PROTECTED RUBY_TYPED_WB_PROTECTED
33446#define RUBY_TYPED_PROMOTED1 RUBY_TYPED_PROMOTED1
33447#pragma GCC visibility push(default)
33448#pragma GCC visibility pop
33449#define TypedData_Wrap_Struct(klass,data_type,sval) rb_data_typed_object_wrap((klass),(sval),(data_type))
33450#define TypedData_Make_Struct0(result,klass,type,size,data_type,sval) VALUE result = rb_data_typed_object_zalloc(klass, size, data_type); (sval) = RBIMPL_CAST((type *)RTYPEDDATA_DATA(result)); RBIMPL_CAST( (void)(sval))
33451#define TypedData_Make_Struct(klass,type,data_type,sval) RB_GNUC_EXTENSION({ TypedData_Make_Struct0( data_struct_obj, klass, type, sizeof(type), data_type, sval); data_struct_obj; })
33452#define TypedData_Get_Struct(obj,type,data_type,sval) ((sval) = RBIMPL_CAST((type *)rb_check_typeddata((obj), (data_type))))
33453#define RBIMPL_CTYPE_H
33454#define _CTYPE_H 1
33455#define _ISbit(bit) ((bit) < 8 ? ((1 << (bit)) << 8) : ((1 << (bit)) >> 8))
33456#define __isctype(c,type) ((*__ctype_b_loc ())[(int) (c)] & (unsigned short int) type)
33457#define __isascii(c) (((c) & ~0x7f) == 0)
33458#define __toascii(c) ((c) & 0x7f)
33459#define __exctype(name) extern int name (int) __THROW
33460#define __tobody(c,f,a,args) (__extension__ ({ int __res; if (sizeof (c) > 1) { if (__builtin_constant_p (c)) { int __c = (c); __res = __c < -128 || __c > 255 ? __c : (a)[__c]; } else __res = f args; } else __res = (a)[(int) (c)]; __res; }))
33461#define isalnum(c) __isctype((c), _ISalnum)
33462#define isalpha(c) __isctype((c), _ISalpha)
33463#define iscntrl(c) __isctype((c), _IScntrl)
33464#define isdigit(c) __isctype((c), _ISdigit)
33465#define islower(c) __isctype((c), _ISlower)
33466#define isgraph(c) __isctype((c), _ISgraph)
33467#define isprint(c) __isctype((c), _ISprint)
33468#define ispunct(c) __isctype((c), _ISpunct)
33469#define isspace(c) __isctype((c), _ISspace)
33470#define isupper(c) __isctype((c), _ISupper)
33471#define isxdigit(c) __isctype((c), _ISxdigit)
33472#define isblank(c) __isctype((c), _ISblank)
33473#define tolower(c) __tobody (c, tolower, *__ctype_tolower_loc (), (c))
33474#define toupper(c) __tobody (c, toupper, *__ctype_toupper_loc (), (c))
33475#define isascii(c) __isascii (c)
33476#define toascii(c) __toascii (c)
33477#define _tolower(c) ((int) (*__ctype_tolower_loc ())[(int) (c)])
33478#define _toupper(c) ((int) (*__ctype_toupper_loc ())[(int) (c)])
33479#define __isctype_l(c,type,locale) ((locale)->__ctype_b[(int) (c)] & (unsigned short int) type)
33480#define __exctype_l(name) extern int name (int, locale_t) __THROW
33481#define __tolower_l(c,locale) __tobody (c, __tolower_l, (locale)->__ctype_tolower, (c, locale))
33482#define __toupper_l(c,locale) __tobody (c, __toupper_l, (locale)->__ctype_toupper, (c, locale))
33483#define tolower_l(c,locale) __tolower_l ((c), (locale))
33484#define toupper_l(c,locale) __toupper_l ((c), (locale))
33485#define __isalnum_l(c,l) __isctype_l((c), _ISalnum, (l))
33486#define __isalpha_l(c,l) __isctype_l((c), _ISalpha, (l))
33487#define __iscntrl_l(c,l) __isctype_l((c), _IScntrl, (l))
33488#define __isdigit_l(c,l) __isctype_l((c), _ISdigit, (l))
33489#define __islower_l(c,l) __isctype_l((c), _ISlower, (l))
33490#define __isgraph_l(c,l) __isctype_l((c), _ISgraph, (l))
33491#define __isprint_l(c,l) __isctype_l((c), _ISprint, (l))
33492#define __ispunct_l(c,l) __isctype_l((c), _ISpunct, (l))
33493#define __isspace_l(c,l) __isctype_l((c), _ISspace, (l))
33494#define __isupper_l(c,l) __isctype_l((c), _ISupper, (l))
33495#define __isxdigit_l(c,l) __isctype_l((c), _ISxdigit, (l))
33496#define __isblank_l(c,l) __isctype_l((c), _ISblank, (l))
33497#define __isascii_l(c,l) ((l), __isascii (c))
33498#define __toascii_l(c,l) ((l), __toascii (c))
33499#define isalnum_l(c,l) __isalnum_l ((c), (l))
33500#define isalpha_l(c,l) __isalpha_l ((c), (l))
33501#define iscntrl_l(c,l) __iscntrl_l ((c), (l))
33502#define isdigit_l(c,l) __isdigit_l ((c), (l))
33503#define islower_l(c,l) __islower_l ((c), (l))
33504#define isgraph_l(c,l) __isgraph_l ((c), (l))
33505#define isprint_l(c,l) __isprint_l ((c), (l))
33506#define ispunct_l(c,l) __ispunct_l ((c), (l))
33507#define isspace_l(c,l) __isspace_l ((c), (l))
33508#define isupper_l(c,l) __isupper_l ((c), (l))
33509#define isxdigit_l(c,l) __isxdigit_l ((c), (l))
33510#define isblank_l(c,l) __isblank_l ((c), (l))
33511#define isascii_l(c,l) __isascii_l ((c), (l))
33512#define toascii_l(c,l) __toascii_l ((c), (l))
33513#define ISASCII rb_isascii
33514#define ISPRINT rb_isprint
33515#define ISGRAPH rb_isgraph
33516#define ISSPACE rb_isspace
33517#define ISUPPER rb_isupper
33518#define ISLOWER rb_islower
33519#define ISALNUM rb_isalnum
33520#define ISALPHA rb_isalpha
33521#define ISDIGIT rb_isdigit
33522#define ISXDIGIT rb_isxdigit
33523#define ISBLANK rb_isblank
33524#define ISCNTRL rb_iscntrl
33525#define ISPUNCT rb_ispunct
33526#define TOUPPER rb_toupper
33527#define TOLOWER rb_tolower
33528#define STRCASECMP st_locale_insensitive_strcasecmp
33529#define STRNCASECMP st_locale_insensitive_strncasecmp
33530#define STRTOUL ruby_strtoul
33531#pragma GCC visibility push(default)
33532#pragma GCC visibility pop
33533#define RBIMPL_EVAL_H
33534#pragma GCC visibility push(default)
33535#define rb_funcall2 rb_funcallv
33536#define rb_funcall3 rb_funcallv_public
33537#pragma GCC visibility pop
33538#define RBIMPL_EVENT_H
33539#pragma GCC visibility push(default)
33540#define RUBY_EVENT_NONE 0x0000
33541#define RUBY_EVENT_LINE 0x0001
33542#define RUBY_EVENT_CLASS 0x0002
33543#define RUBY_EVENT_END 0x0004
33544#define RUBY_EVENT_CALL 0x0008
33545#define RUBY_EVENT_RETURN 0x0010
33546#define RUBY_EVENT_C_CALL 0x0020
33547#define RUBY_EVENT_C_RETURN 0x0040
33548#define RUBY_EVENT_RAISE 0x0080
33549#define RUBY_EVENT_ALL 0x00ff
33550#define RUBY_EVENT_B_CALL 0x0100
33551#define RUBY_EVENT_B_RETURN 0x0200
33552#define RUBY_EVENT_THREAD_BEGIN 0x0400
33553#define RUBY_EVENT_THREAD_END 0x0800
33554#define RUBY_EVENT_FIBER_SWITCH 0x1000
33555#define RUBY_EVENT_SCRIPT_COMPILED 0x2000
33556#define RUBY_EVENT_TRACEPOINT_ALL 0xffff
33557#define RUBY_EVENT_RESERVED_FOR_INTERNAL_USE 0x030000
33558#define RUBY_INTERNAL_EVENT_SWITCH 0x040000
33559#define RUBY_EVENT_SWITCH 0x040000
33560#define RUBY_INTERNAL_EVENT_NEWOBJ 0x100000
33561#define RUBY_INTERNAL_EVENT_FREEOBJ 0x200000
33562#define RUBY_INTERNAL_EVENT_GC_START 0x400000
33563#define RUBY_INTERNAL_EVENT_GC_END_MARK 0x800000
33564#define RUBY_INTERNAL_EVENT_GC_END_SWEEP 0x1000000
33565#define RUBY_INTERNAL_EVENT_GC_ENTER 0x2000000
33566#define RUBY_INTERNAL_EVENT_GC_EXIT 0x4000000
33567#define RUBY_INTERNAL_EVENT_OBJSPACE_MASK 0x7f00000
33568#define RUBY_INTERNAL_EVENT_MASK 0xffff0000
33569#define RB_EVENT_HOOKS_HAVE_CALLBACK_DATA 1
33570#pragma GCC visibility pop
33571#define RBIMPL_GC_H
33572#pragma GCC visibility push(default)
33573#pragma GCC visibility pop
33574#define RBIMPL_GLOB_H
33575#pragma GCC visibility push(default)
33576#pragma GCC visibility pop
33577#define RBIMPL_GLOBALS_H
33578#pragma GCC visibility push(default)
33579#define RUBY_INTEGER_UNIFICATION 1
33580#define CLASS_OF rb_class_of
33581#pragma GCC visibility pop
33582#define RBIMPL_INTERPRETER_H
33583#pragma GCC visibility push(default)
33584#define RUBY_INIT_STACK VALUE variable_in_this_stack_frame; ruby_init_stack(&variable_in_this_stack_frame);
33585#pragma GCC visibility pop
33586#define RBIMPL_ITERATOR_H
33587#pragma GCC visibility push(default)
33588#define RB_BLOCK_CALL_FUNC_STRICT 1
33589#define RUBY_BLOCK_CALL_FUNC_TAKES_BLOCKARG 1
33590#define RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg,callback_arg) VALUE yielded_arg, VALUE callback_arg, int argc, const VALUE *argv, VALUE blockarg
33591#pragma GCC visibility pop
33592#define RBIMPL_MEMORY_H
33593#define DSIZE_T uint128_t
33594#define RUBY_ALLOCV_LIMIT 1024
33595#define RB_GC_GUARD(v) (*__extension__ ({ volatile VALUE *rb_gc_guarded_ptr = &(v); __asm__("" : : "m"(rb_gc_guarded_ptr)); rb_gc_guarded_ptr; }))
33596#define RB_ALLOC_N(type,n) RBIMPL_CAST((type *)ruby_xmalloc2((n), sizeof(type)))
33597#define RB_ALLOC(type) RBIMPL_CAST((type *)ruby_xmalloc(sizeof(type)))
33598#define RB_ZALLOC_N(type,n) RBIMPL_CAST((type *)ruby_xcalloc((n), sizeof(type)))
33599#define RB_ZALLOC(type) (RB_ZALLOC_N(type, 1))
33600#define RB_REALLOC_N(var,type,n) ((var) = RBIMPL_CAST((type *)ruby_xrealloc2((void *)(var), (n), sizeof(type))))
33601#define ALLOCA_N(type,n) RBIMPL_CAST((type *) __builtin_alloca_with_align( rbimpl_size_mul_or_raise(sizeof(type), (n)), RUBY_ALIGNOF(type) * CHAR_BIT))
33602#define RB_ALLOCV(v,n) ((n) < RUBY_ALLOCV_LIMIT ? ((v) = 0, alloca(n)) : rb_alloc_tmp_buffer(&(v), (n)))
33603#define RB_ALLOCV_N(type,v,n) RBIMPL_CAST((type *) (((size_t)(n) < RUBY_ALLOCV_LIMIT / sizeof(type)) ? ((v) = 0, alloca((n) * sizeof(type))) : rb_alloc_tmp_buffer2(&(v), (n), sizeof(type))))
33604#define RB_ALLOCV_END(v) rb_free_tmp_buffer(&(v))
33605#define MEMZERO(p,type,n) memset((p), 0, rbimpl_size_mul_or_raise(sizeof(type), (n)))
33606#define MEMCPY(p1,p2,type,n) memcpy((p1), (p2), rbimpl_size_mul_or_raise(sizeof(type), (n)))
33607#define MEMMOVE(p1,p2,type,n) memmove((p1), (p2), rbimpl_size_mul_or_raise(sizeof(type), (n)))
33608#define MEMCMP(p1,p2,type,n) memcmp((p1), (p2), rbimpl_size_mul_or_raise(sizeof(type), (n)))
33609#define ALLOC_N RB_ALLOC_N
33610#define ALLOC RB_ALLOC
33611#define ZALLOC_N RB_ZALLOC_N
33612#define ZALLOC RB_ZALLOC
33613#define REALLOC_N RB_REALLOC_N
33614#define ALLOCV RB_ALLOCV
33615#define ALLOCV_N RB_ALLOCV_N
33616#define ALLOCV_END RB_ALLOCV_END
33617#pragma GCC visibility push(default)
33618#pragma GCC visibility pop
33619#undef memcpy
33620#define memcpy ruby_nonempty_memcpy
33621#define RBIMPL_MODULE_H
33622#pragma GCC visibility push(default)
33623#pragma GCC visibility pop
33624#define RBIMPL_NEWOBJ_H
33625#define RB_NEWOBJ(obj,type) type *(obj) = RBIMPL_CAST((type *)rb_newobj())
33626#define RB_NEWOBJ_OF(obj,type,klass,flags) type *(obj) = RBIMPL_CAST((type *)rb_newobj_of(klass, flags))
33627#define NEWOBJ RB_NEWOBJ
33628#define NEWOBJ_OF RB_NEWOBJ_OF
33629#define OBJSETUP rb_obj_setup
33630#define CLONESETUP rb_clone_setup
33631#define DUPSETUP rb_dup_setup
33632#pragma GCC visibility push(default)
33633#pragma GCC visibility pop
33634#define RBIMPL_SCAN_ARGS_H
33635#define RBIMPL_ATTR_DIAGNOSE_IF_H
33636#define RBIMPL_ATTR_DIAGNOSE_IF(_,__,___) RBIMPL_WARNING_PUSH() RBIMPL_WARNING_IGNORED(-Wgcc-compat) __attribute__((__diagnose_if__(_, __, ___))) RBIMPL_WARNING_POP()
33637#define RBIMPL_INTERN_ARRAY_H
33638#pragma GCC visibility push(default)
33639#define rb_ary_new2 rb_ary_new_capa
33640#define rb_ary_new3 rb_ary_new_from_args
33641#define rb_ary_new4 rb_ary_new_from_values
33642#pragma GCC visibility pop
33643#define RBIMPL_INTERN_ERROR_H
33644#define UNLIMITED_ARGUMENTS (-1)
33645#define rb_exc_new2 rb_exc_new_cstr
33646#define rb_exc_new3 rb_exc_new_str
33647#define rb_check_trusted rb_check_trusted
33648#define rb_check_trusted_inline rb_check_trusted
33649#define rb_check_arity rb_check_arity
33650#pragma GCC visibility push(default)
33651#pragma GCC visibility pop
33652#define rb_check_frozen_internal(obj) do { VALUE frozen_obj = (obj); if (RB_UNLIKELY(RB_OBJ_FROZEN(frozen_obj))) { rb_error_frozen_object(frozen_obj); } } while (0)
33653#define rb_check_frozen rb_check_frozen_inline
33654#define RBIMPL_INTERN_HASH_H
33655#pragma GCC visibility push(default)
33656#define st_foreach_safe rb_st_foreach_safe
33657#pragma GCC visibility pop
33658#define RBIMPL_INTERN_PROC_H
33659#pragma GCC visibility push(default)
33660#pragma GCC visibility pop
33661#define RB_SCAN_ARGS_PASS_CALLED_KEYWORDS 0
33662#define RB_SCAN_ARGS_KEYWORDS 1
33663#define RB_SCAN_ARGS_LAST_HASH_KEYWORDS 3
33664#define RB_NO_KEYWORDS 0
33665#define RB_PASS_KEYWORDS 1
33666#define RB_PASS_CALLED_KEYWORDS rb_keyword_given_p()
33667#define HAVE_RB_SCAN_ARGS_OPTIONAL_HASH 1
33668#pragma GCC visibility push(default)
33669#pragma GCC visibility pop
33670#define rb_scan_args_isdigit(c) (RBIMPL_CAST((unsigned char)((c)-'0'))<10)
33671#define rb_scan_args_count_end(fmt,ofs,vari) ((fmt)[ofs] ? -1 : (vari))
33672#define rb_scan_args_count_block(fmt,ofs,vari) ((fmt)[ofs]!='&' ? rb_scan_args_count_end(fmt, ofs, vari) : rb_scan_args_count_end(fmt, (ofs)+1, (vari)+1))
33673#define rb_scan_args_count_hash(fmt,ofs,vari) ((fmt)[ofs]!=':' ? rb_scan_args_count_block(fmt, ofs, vari) : rb_scan_args_count_block(fmt, (ofs)+1, (vari)+1))
33674#define rb_scan_args_count_trail(fmt,ofs,vari) (!rb_scan_args_isdigit((fmt)[ofs]) ? rb_scan_args_count_hash(fmt, ofs, vari) : rb_scan_args_count_hash(fmt, (ofs)+1, (vari)+((fmt)[ofs]-'0')))
33675#define rb_scan_args_count_var(fmt,ofs,vari) ((fmt)[ofs]!='*' ? rb_scan_args_count_trail(fmt, ofs, vari) : rb_scan_args_count_trail(fmt, (ofs)+1, (vari)+1))
33676#define rb_scan_args_count_opt(fmt,ofs,vari) (!rb_scan_args_isdigit((fmt)[ofs]) ? rb_scan_args_count_var(fmt, ofs, vari) : rb_scan_args_count_var(fmt, (ofs)+1, (vari)+(fmt)[ofs]-'0'))
33677#define rb_scan_args_count_lead(fmt,ofs,vari) (!rb_scan_args_isdigit((fmt)[ofs]) ? rb_scan_args_count_var(fmt, ofs, vari) : rb_scan_args_count_opt(fmt, (ofs)+1, (vari)+(fmt)[ofs]-'0'))
33678#define rb_scan_args_count(fmt) rb_scan_args_count_lead(fmt, 0, 0)
33679#define rb_scan_args_verify(fmt,varc) RBIMPL_ASSERT_NOTHING
33680#define rb_scan_args0(argc,argv,fmt,varc,vars) rb_scan_args_set(RB_SCAN_ARGS_PASS_CALLED_KEYWORDS, argc, argv, rb_scan_args_n_lead(fmt), rb_scan_args_n_opt(fmt), rb_scan_args_n_trail(fmt), rb_scan_args_f_var(fmt), rb_scan_args_f_hash(fmt), rb_scan_args_f_block(fmt), (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
33681#define rb_scan_args_kw0(kw_flag,argc,argv,fmt,varc,vars) rb_scan_args_set(kw_flag, argc, argv, rb_scan_args_n_lead(fmt), rb_scan_args_n_opt(fmt), rb_scan_args_n_trail(fmt), rb_scan_args_f_var(fmt), rb_scan_args_f_hash(fmt), rb_scan_args_f_block(fmt), (rb_scan_args_verify(fmt, varc), vars), (char *)fmt, varc)
33682#pragma clang diagnostic push
33683#pragma clang diagnostic ignored "-Wgcc-compat"
33684#pragma clang diagnostic pop
33685#pragma clang diagnostic push
33686#pragma clang diagnostic ignored "-Wgcc-compat"
33687#pragma clang diagnostic pop
33688#define rb_scan_args_next_param() vars[vari++]
33689#undef rb_scan_args_next_param
33690#define rb_scan_args(argc,argvp,fmt,...) __builtin_choose_expr( __builtin_constant_p(fmt), rb_scan_args0( argc, argvp, fmt, (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), ((VALUE*[]){__VA_ARGS__})), (rb_scan_args)(argc, argvp, fmt, __VA_ARGS__))
33691#define rb_scan_args_kw(kw_flag,argc,argvp,fmt,...) __builtin_choose_expr( __builtin_constant_p(fmt), rb_scan_args_kw0( kw_flag, argc, argvp, fmt, (sizeof((VALUE*[]){__VA_ARGS__})/sizeof(VALUE*)), ((VALUE*[]){__VA_ARGS__})), (rb_scan_args_kw)(kw_flag, argc, argvp, fmt, __VA_ARGS__ ))
33692#define RBIMPL_SYMBOL_H
33693#define RB_ID2SYM rb_id2sym
33694#define RB_SYM2ID rb_sym2id
33695#define ID2SYM RB_ID2SYM
33696#define SYM2ID RB_SYM2ID
33697#define CONST_ID_CACHE RUBY_CONST_ID_CACHE
33698#define CONST_ID RUBY_CONST_ID
33699#define rb_intern_const rb_intern_const
33700#pragma GCC visibility push(default)
33701#pragma GCC visibility pop
33702#define RUBY_CONST_ID_CACHE(result,str) { static ID rb_intern_id_cache; rbimpl_intern_const(&rb_intern_id_cache, (str)); result rb_intern_id_cache; }
33703#define RUBY_CONST_ID(var,str) do { static ID rbimpl_id; (var) = rbimpl_intern_const(&rbimpl_id, (str)); } while (0)
33704#define rb_intern(str) (RBIMPL_CONSTANT_P(str) ? __extension__ ({ static ID rbimpl_id; rbimpl_intern_const(&rbimpl_id, (str)); }) : (rb_intern)(str))
33705#define RBIMPL_VARIABLE_H
33706#pragma GCC visibility push(default)
33707#pragma GCC visibility pop
33708#define RUBY_BACKWARD2_INTTYPES_H
33709#define PRI_INT_PREFIX ""
33710#define PRI_LONG_PREFIX "l"
33711#define PRI_SHORT_PREFIX "h"
33712#define PRI_64_PREFIX PRI_LONG_PREFIX
33713#define RUBY_PRI_VALUE_MARK "\v"
33714#define PRIdVALUE PRI_VALUE_PREFIX"d"
33715#define PRIoVALUE PRI_VALUE_PREFIX"o"
33716#define PRIuVALUE PRI_VALUE_PREFIX"u"
33717#define PRIxVALUE PRI_VALUE_PREFIX"x"
33718#define PRIXVALUE PRI_VALUE_PREFIX"X"
33719#define PRIsVALUE PRI_VALUE_PREFIX"i" RUBY_PRI_VALUE_MARK
33720#define PRIdPTRDIFF PRI_PTRDIFF_PREFIX"d"
33721#define PRIiPTRDIFF PRI_PTRDIFF_PREFIX"i"
33722#define PRIoPTRDIFF PRI_PTRDIFF_PREFIX"o"
33723#define PRIuPTRDIFF PRI_PTRDIFF_PREFIX"u"
33724#define PRIxPTRDIFF PRI_PTRDIFF_PREFIX"x"
33725#define PRIXPTRDIFF PRI_PTRDIFF_PREFIX"X"
33726#define PRIdSIZE PRI_SIZE_PREFIX"d"
33727#define PRIiSIZE PRI_SIZE_PREFIX"i"
33728#define PRIoSIZE PRI_SIZE_PREFIX"o"
33729#define PRIuSIZE PRI_SIZE_PREFIX"u"
33730#define PRIxSIZE PRI_SIZE_PREFIX"x"
33731#define PRIXSIZE PRI_SIZE_PREFIX"X"
33732#define RUBY_BACKWARD2_RMODULE_H
33733#define RMODULE_IV_TBL(m) RCLASS_IV_TBL(m)
33734#define RMODULE_CONST_TBL(m) RCLASS_CONST_TBL(m)
33735#define RMODULE_M_TBL(m) RCLASS_M_TBL(m)
33736#define RMODULE_SUPER(m) RCLASS_SUPER(m)
33737#define RUBY_BACKWARD2_R_CAST_H
33738#define R_CAST(st) (struct st*)
33739#define RMOVED(obj) (R_CAST(RMoved)(obj))
33740#pragma GCC visibility push(default)
33741#define USE_SYMBOL_AS_METHOD_NAME 1
33742#define FilePathValue(v) (RB_GC_GUARD(v) = rb_get_path(v))
33743#define FilePathStringValue(v) ((v) = rb_get_path(v))
33744#define rb_varargs_argc_check_runtime(argc,vargc) (((argc) <= (vargc)) ? (argc) : (rb_fatal("argc(%d) exceeds actual arguments(%d)", argc, vargc), 0))
33745#define rb_varargs_argc_valid_p(argc,vargc) ((argc) == 0 ? (vargc) <= 1 : (argc) == (vargc))
33746#define rb_varargs_bad_length(argc,vargc) ((argc)/rb_varargs_argc_valid_p(argc, vargc))
33747#define rb_varargs_argc_check(argc,vargc) __builtin_choose_expr(__builtin_constant_p(argc), (rb_varargs_argc_valid_p(argc, vargc) ? (argc) : rb_varargs_bad_length(argc, vargc)), rb_varargs_argc_check_runtime(argc, vargc))
33748#define RUBY_INTERN_H 1
33749#define RBIMPL_INTERN_BIGNUM_H
33750#pragma GCC visibility push(default)
33751#define rb_big2int(x) rb_big2long(x)
33752#define rb_big2uint(x) rb_big2ulong(x)
33753#pragma clang diagnostic push
33754#pragma clang diagnostic ignored "-Wc++11-long-long"
33755#pragma clang diagnostic pop
33756#pragma clang diagnostic push
33757#pragma clang diagnostic ignored "-Wc++11-long-long"
33758#pragma clang diagnostic pop
33759#define INTEGER_PACK_MSWORD_FIRST 0x01
33760#define INTEGER_PACK_LSWORD_FIRST 0x02
33761#define INTEGER_PACK_MSBYTE_FIRST 0x10
33762#define INTEGER_PACK_LSBYTE_FIRST 0x20
33763#define INTEGER_PACK_NATIVE_BYTE_ORDER 0x40
33764#define INTEGER_PACK_2COMP 0x80
33765#define INTEGER_PACK_FORCE_GENERIC_IMPLEMENTATION 0x400
33766#define INTEGER_PACK_FORCE_BIGNUM 0x100
33767#define INTEGER_PACK_NEGATIVE 0x200
33768#define INTEGER_PACK_LITTLE_ENDIAN (INTEGER_PACK_LSWORD_FIRST | INTEGER_PACK_LSBYTE_FIRST)
33769#define INTEGER_PACK_BIG_ENDIAN (INTEGER_PACK_MSWORD_FIRST | INTEGER_PACK_MSBYTE_FIRST)
33770#pragma GCC visibility pop
33771#define RBIMPL_INTERN_COMPAR_H
33772#pragma GCC visibility push(default)
33773#pragma GCC visibility pop
33774#define RBIMPL_INTERN_COMPLEX_H
33775#pragma GCC visibility push(default)
33776#define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0))
33777#define rb_complex_raw2(x,y) rb_complex_raw((x), (y))
33778#define rb_complex_new1(x) rb_complex_new((x), INT2FIX(0))
33779#define rb_complex_new2(x,y) rb_complex_new((x), (y))
33780#define rb_complex_add rb_complex_plus
33781#define rb_complex_sub rb_complex_minus
33782#define rb_complex_nagate rb_complex_uminus
33783#define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
33784#define rb_Complex2(x,y) rb_Complex((x), (y))
33785#pragma GCC visibility pop
33786#define RBIMPL_INTERN_CONT_H
33787#pragma GCC visibility push(default)
33788#pragma GCC visibility pop
33789#define RBIMPL_INTERN_DIR_H
33790#pragma GCC visibility push(default)
33791#pragma GCC visibility pop
33792#define RBIMPL_INTERN_ENUM_H
33793#pragma GCC visibility push(default)
33794#pragma GCC visibility pop
33795#define RBIMPL_INTERN_ENUMERATOR_H
33796#define RBIMPL_INTERN_EVAL_H
33797#pragma GCC visibility push(default)
33798#pragma GCC visibility pop
33799#pragma GCC visibility push(default)
33800#pragma GCC visibility pop
33801#define SIZED_ENUMERATOR(obj,argc,argv,size_fn) rb_enumeratorize_with_size((obj), ID2SYM(rb_frame_this_func()), (argc), (argv), (size_fn))
33802#define SIZED_ENUMERATOR_KW(obj,argc,argv,size_fn,kw_splat) rb_enumeratorize_with_size_kw((obj), ID2SYM(rb_frame_this_func()), (argc), (argv), (size_fn), (kw_splat))
33803#define RETURN_SIZED_ENUMERATOR(obj,argc,argv,size_fn) do { if (!rb_block_given_p()) return SIZED_ENUMERATOR(obj, argc, argv, size_fn); } while (0)
33804#define RETURN_SIZED_ENUMERATOR_KW(obj,argc,argv,size_fn,kw_splat) do { if (!rb_block_given_p()) return SIZED_ENUMERATOR_KW(obj, argc, argv, size_fn, kw_splat); } while (0)
33805#define RETURN_ENUMERATOR(obj,argc,argv) RETURN_SIZED_ENUMERATOR(obj, argc, argv, 0)
33806#define RETURN_ENUMERATOR_KW(obj,argc,argv,kw_splat) RETURN_SIZED_ENUMERATOR_KW(obj, argc, argv, 0, kw_splat)
33807#define RBIMPL_INTERN_FILE_H
33808#pragma GCC visibility push(default)
33809#pragma GCC visibility pop
33810#define RBIMPL_INTERN_GC_H
33811#pragma GCC visibility push(default)
33812#pragma GCC visibility pop
33813#define RBIMPL_INTERN_IO_H
33814#pragma GCC visibility push(default)
33815#define rb_defout rb_stdout
33816#define RB_RESERVED_FD_P(fd) rb_reserved_fd_p(fd)
33817#pragma GCC visibility pop
33818#define RBIMPL_INTERN_LOAD_H
33819#pragma GCC visibility push(default)
33820#pragma GCC visibility pop
33821#define RBIMPL_INTERN_MARSHAL_H
33822#pragma GCC visibility push(default)
33823#pragma GCC visibility pop
33824#define RBIMPL_INTERN_NUMERIC_H
33825#pragma GCC visibility push(default)
33826#define RB_NUM_COERCE_FUNCS_NEED_OPID 1
33827#pragma GCC visibility pop
33828#define RBIMPL_INTERN_OBJECT_H
33829#pragma GCC visibility push(default)
33830#define RB_OBJ_INIT_COPY(obj,orig) ((obj) != (orig) && (rb_obj_init_copy((obj), (orig)), 1))
33831#define OBJ_INIT_COPY(obj,orig) RB_OBJ_INIT_COPY(obj, orig)
33832#pragma GCC visibility pop
33833#define RBIMPL_INTERN_PARSE_H
33834#pragma GCC visibility push(default)
33835#pragma GCC visibility pop
33836#define RBIMPL_INTERN_PROCESS_H
33837#pragma GCC visibility push(default)
33838#pragma GCC visibility pop
33839#define RBIMPL_INTERN_RANDOM_H
33840#pragma GCC visibility push(default)
33841#pragma GCC visibility pop
33842#define RBIMPL_INTERN_RANGE_H
33843#pragma GCC visibility push(default)
33844#pragma GCC visibility pop
33845#define RBIMPL_INTERN_RATIONAL_H
33846#pragma GCC visibility push(default)
33847#define rb_rational_raw1(x) rb_rational_raw((x), INT2FIX(1))
33848#define rb_rational_raw2(x,y) rb_rational_raw((x), (y))
33849#define rb_rational_new1(x) rb_rational_new((x), INT2FIX(1))
33850#define rb_rational_new2(x,y) rb_rational_new((x), (y))
33851#define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
33852#define rb_Rational2(x,y) rb_Rational((x), (y))
33853#pragma GCC visibility pop
33854#define RBIMPL_INTERN_RE_H
33855#pragma GCC visibility push(default)
33856#define rb_memcmp memcmp
33857#define HAVE_RB_REG_NEW_STR 1
33858#pragma GCC visibility pop
33859#define RBIMPL_INTERN_RUBY_H
33860#pragma GCC visibility push(default)
33861#define rb_argv rb_get_argv()
33862#pragma GCC visibility pop
33863#define RBIMPL_INTERN_SELECT_H
33864#define RBIMPL_INTERN_SELECT_LARGESIZE_H
33865#define rb_fd_ptr rb_fd_ptr
33866#define rb_fd_max rb_fd_max
33867#pragma GCC visibility push(default)
33868#pragma GCC visibility pop
33869#pragma GCC visibility push(default)
33870#pragma GCC visibility pop
33871#define RBIMPL_INTERN_SIGNAL_H
33872#pragma GCC visibility push(default)
33873#define posix_signal ruby_posix_signal
33874#pragma GCC visibility pop
33875#define RBIMPL_INTERN_SPRINTF_H
33876#pragma GCC visibility push(default)
33877#pragma GCC visibility pop
33878#define RBIMPL_INTERN_STRING_H
33879#pragma GCC visibility push(default)
33880#define rb_str_dup_frozen rb_str_new_frozen
33881#define rb_hash_uint32(h,i) st_hash_uint32((h), (i))
33882#define rb_hash_uint(h,i) st_hash_uint((h), (i))
33883#define rb_hash_end(h) st_hash_end(h)
33884#define rb_str_new(str,len) ((RBIMPL_CONSTANT_P(str) && RBIMPL_CONSTANT_P(len) ? rb_str_new_static : rb_str_new) ((str), (len)))
33885#define rb_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_str_new_cstr : rb_str_new_cstr) (str))
33886#define rb_usascii_str_new(str,len) ((RBIMPL_CONSTANT_P(str) && RBIMPL_CONSTANT_P(len) ? rb_usascii_str_new_static : rb_usascii_str_new) ((str), (len)))
33887#define rb_utf8_str_new(str,len) ((RBIMPL_CONSTANT_P(str) && RBIMPL_CONSTANT_P(len) ? rb_utf8_str_new_static : rb_utf8_str_new) ((str), (len)))
33888#define rb_tainted_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_tainted_str_new_cstr : rb_tainted_str_new_cstr) (str))
33889#define rb_usascii_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_usascii_str_new_cstr : rb_usascii_str_new_cstr) (str))
33890#define rb_utf8_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_utf8_str_new_cstr : rb_utf8_str_new_cstr) (str))
33891#define rb_external_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_external_str_new_cstr : rb_external_str_new_cstr) (str))
33892#define rb_locale_str_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_locale_str_new_cstr : rb_locale_str_new_cstr) (str))
33893#define rb_str_buf_new_cstr(str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_str_buf_new_cstr : rb_str_buf_new_cstr) (str))
33894#define rb_str_cat_cstr(buf,str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_str_cat_cstr : rb_str_cat_cstr) ((buf), (str)))
33895#define rb_exc_new_cstr(exc,str) ((RBIMPL_CONSTANT_P(str) ? rbimpl_exc_new_cstr : rb_exc_new_cstr) ((exc), (str)))
33896#define rb_str_new2 rb_str_new_cstr
33897#define rb_str_new3 rb_str_new_shared
33898#define rb_str_new4 rb_str_new_frozen
33899#define rb_str_new5 rb_str_new_with_class
33900#define rb_tainted_str_new2 rb_tainted_str_new_cstr
33901#define rb_str_buf_new2 rb_str_buf_new_cstr
33902#define rb_usascii_str_new2 rb_usascii_str_new_cstr
33903#define rb_str_buf_cat rb_str_cat
33904#define rb_str_buf_cat2 rb_str_cat_cstr
33905#define rb_str_cat2 rb_str_cat_cstr
33906#define rb_strlen_lit(str) (sizeof(str "") - 1)
33907#define rb_str_new_lit(str) rb_str_new_static((str), rb_strlen_lit(str))
33908#define rb_usascii_str_new_lit(str) rb_usascii_str_new_static((str), rb_strlen_lit(str))
33909#define rb_utf8_str_new_lit(str) rb_utf8_str_new_static((str), rb_strlen_lit(str))
33910#define rb_enc_str_new_lit(str,enc) rb_enc_str_new_static((str), rb_strlen_lit(str), (enc))
33911#define rb_str_new_literal(str) rb_str_new_lit(str)
33912#define rb_usascii_str_new_literal(str) rb_usascii_str_new_lit(str)
33913#define rb_utf8_str_new_literal(str) rb_utf8_str_new_lit(str)
33914#define rb_enc_str_new_literal(str,enc) rb_enc_str_new_lit(str, enc)
33915#pragma GCC visibility pop
33916#define RBIMPL_INTERN_STRUCT_H
33917#pragma GCC visibility push(default)
33918#pragma GCC visibility pop
33919#define RBIMPL_INTERN_THREAD_H
33920#pragma GCC visibility push(default)
33921#define RUBY_UBF_IO RBIMPL_CAST((rb_unblock_function_t *)-1)
33922#define RUBY_UBF_PROCESS RBIMPL_CAST((rb_unblock_function_t *)-1)
33923#pragma GCC visibility pop
33924#define RBIMPL_INTERN_TIME_H
33925#pragma GCC visibility push(default)
33926#pragma GCC visibility pop
33927#define RBIMPL_INTERN_VARIABLE_H
33928#pragma GCC visibility push(default)
33929#pragma GCC visibility pop
33930#define RUBY_VM 1
33931#define HAVE_NATIVETHREAD
33932#define InitVM(ext) {void InitVM_##ext(void);InitVM_##ext();}
33933#define RUBY_SUBST_H 1
33934#undef snprintf
33935#undef vsnprintf
33936#define snprintf ruby_snprintf
33937#define vsnprintf ruby_vsnprintf
33938#pragma GCC visibility pop
33939#define RUBY_VM_CORE_H
33940#define N_OR_RUBY_DEBUG(n) (((n) > 0) ? (n) : RUBY_DEBUG)
33941#define VM_CHECK_MODE N_OR_RUBY_DEBUG(0)
33942#define VMDEBUG 0
33943#define _SIGNAL_H
33944#define _BITS_SIGNUM_H 1
33945#define _BITS_SIGNUM_GENERIC_H 1
33946#define SIG_ERR ((__sighandler_t) -1)
33947#define SIG_DFL ((__sighandler_t) 0)
33948#define SIG_IGN ((__sighandler_t) 1)
33949#define SIG_HOLD ((__sighandler_t) 2)
33950#define SIGINT 2
33951#define SIGILL 4
33952#define SIGABRT 6
33953#define SIGFPE 8
33954#define SIGSEGV 11
33955#define SIGTERM 15
33956#define SIGHUP 1
33957#define SIGQUIT 3
33958#define SIGTRAP 5
33959#define SIGKILL 9
33960#define SIGBUS 10
33961#define SIGSYS 12
33962#define SIGPIPE 13
33963#define SIGALRM 14
33964#define SIGURG 16
33965#define SIGSTOP 17
33966#define SIGTSTP 18
33967#define SIGCONT 19
33968#define SIGCHLD 20
33969#define SIGTTIN 21
33970#define SIGTTOU 22
33971#define SIGPOLL 23
33972#define SIGXCPU 24
33973#define SIGXFSZ 25
33974#define SIGVTALRM 26
33975#define SIGPROF 27
33976#define SIGUSR1 30
33977#define SIGUSR2 31
33978#define SIGWINCH 28
33979#define SIGIO SIGPOLL
33980#define SIGIOT SIGABRT
33981#define SIGCLD SIGCHLD
33982#define __SIGRTMIN 32
33983#define __SIGRTMAX __SIGRTMIN
33984#define _NSIG (__SIGRTMAX + 1)
33985#define SIGSTKFLT 16
33986#define SIGPWR 30
33987#undef SIGBUS
33988#define SIGBUS 7
33989#undef SIGUSR1
33990#define SIGUSR1 10
33991#undef SIGUSR2
33992#define SIGUSR2 12
33993#undef SIGCHLD
33994#define SIGCHLD 17
33995#undef SIGCONT
33996#define SIGCONT 18
33997#undef SIGSTOP
33998#define SIGSTOP 19
33999#undef SIGTSTP
34000#define SIGTSTP 20
34001#undef SIGURG
34002#define SIGURG 23
34003#undef SIGPOLL
34004#define SIGPOLL 29
34005#undef SIGSYS
34006#define SIGSYS 31
34007#undef __SIGRTMAX
34008#define __SIGRTMAX 64
34009#define __sig_atomic_t_defined 1
34010#define __siginfo_t_defined 1
34011#define __WORDSIZE 64
34012#define __WORDSIZE_TIME64_COMPAT32 1
34013#define __SYSCALL_WORDSIZE 64
34014#define ____sigval_t_defined
34015#define __SI_MAX_SIZE 128
34016#define __SI_PAD_SIZE ((__SI_MAX_SIZE / sizeof (int)) - 4)
34017#define _BITS_SIGINFO_ARCH_H 1
34018#define __SI_ALIGNMENT
34019#define __SI_BAND_TYPE long int
34020#define __SI_CLOCK_T __clock_t
34021#define __SI_ERRNO_THEN_CODE 1
34022#define __SI_HAVE_SIGSYS 1
34023#define __SI_SIGFAULT_ADDL
34024#define si_pid _sifields._kill.si_pid
34025#define si_uid _sifields._kill.si_uid
34026#define si_timerid _sifields._timer.si_tid
34027#define si_overrun _sifields._timer.si_overrun
34028#define si_status _sifields._sigchld.si_status
34029#define si_utime _sifields._sigchld.si_utime
34030#define si_stime _sifields._sigchld.si_stime
34031#define si_value _sifields._rt.si_sigval
34032#define si_int _sifields._rt.si_sigval.sival_int
34033#define si_ptr _sifields._rt.si_sigval.sival_ptr
34034#define si_addr _sifields._sigfault.si_addr
34035#define si_addr_lsb _sifields._sigfault.si_addr_lsb
34036#define si_lower _sifields._sigfault._bounds._addr_bnd._lower
34037#define si_upper _sifields._sigfault._bounds._addr_bnd._upper
34038#define si_pkey _sifields._sigfault._bounds._pkey
34039#define si_band _sifields._sigpoll.si_band
34040#define si_fd _sifields._sigpoll.si_fd
34041#define si_call_addr _sifields._sigsys._call_addr
34042#define si_syscall _sifields._sigsys._syscall
34043#define si_arch _sifields._sigsys._arch
34044#define _BITS_SIGINFO_CONSTS_H 1
34045#define __SI_ASYNCIO_AFTER_SIGIO 1
34046#define SI_ASYNCNL SI_ASYNCNL
34047#define SI_DETHREAD SI_DETHREAD
34048#define SI_TKILL SI_TKILL
34049#define SI_SIGIO SI_SIGIO
34050#define SI_ASYNCIO SI_ASYNCIO
34051#define SI_MESGQ SI_MESGQ
34052#define SI_TIMER SI_TIMER
34053#define SI_ASYNCIO SI_ASYNCIO
34054#define SI_QUEUE SI_QUEUE
34055#define SI_USER SI_USER
34056#define SI_KERNEL SI_KERNEL
34057#define ILL_ILLOPC ILL_ILLOPC
34058#define ILL_ILLOPN ILL_ILLOPN
34059#define ILL_ILLADR ILL_ILLADR
34060#define ILL_ILLTRP ILL_ILLTRP
34061#define ILL_PRVOPC ILL_PRVOPC
34062#define ILL_PRVREG ILL_PRVREG
34063#define ILL_COPROC ILL_COPROC
34064#define ILL_BADSTK ILL_BADSTK
34065#define ILL_BADIADDR ILL_BADIADDR
34066#define FPE_INTDIV FPE_INTDIV
34067#define FPE_INTOVF FPE_INTOVF
34068#define FPE_FLTDIV FPE_FLTDIV
34069#define FPE_FLTOVF FPE_FLTOVF
34070#define FPE_FLTUND FPE_FLTUND
34071#define FPE_FLTRES FPE_FLTRES
34072#define FPE_FLTINV FPE_FLTINV
34073#define FPE_FLTSUB FPE_FLTSUB
34074#define FPE_FLTUNK FPE_FLTUNK
34075#define FPE_CONDTRAP FPE_CONDTRAP
34076#define SEGV_MAPERR SEGV_MAPERR
34077#define SEGV_ACCERR SEGV_ACCERR
34078#define SEGV_BNDERR SEGV_BNDERR
34079#define SEGV_PKUERR SEGV_PKUERR
34080#define SEGV_ACCADI SEGV_ACCADI
34081#define SEGV_ADIDERR SEGV_ADIDERR
34082#define SEGV_ADIPERR SEGV_ADIPERR
34083#define BUS_ADRALN BUS_ADRALN
34084#define BUS_ADRERR BUS_ADRERR
34085#define BUS_OBJERR BUS_OBJERR
34086#define BUS_MCEERR_AR BUS_MCEERR_AR
34087#define BUS_MCEERR_AO BUS_MCEERR_AO
34088#define TRAP_BRKPT TRAP_BRKPT
34089#define TRAP_TRACE TRAP_TRACE
34090#define TRAP_BRANCH TRAP_BRANCH
34091#define TRAP_HWBKPT TRAP_HWBKPT
34092#define TRAP_UNK TRAP_UNK
34093#define CLD_EXITED CLD_EXITED
34094#define CLD_KILLED CLD_KILLED
34095#define CLD_DUMPED CLD_DUMPED
34096#define CLD_TRAPPED CLD_TRAPPED
34097#define CLD_STOPPED CLD_STOPPED
34098#define CLD_CONTINUED CLD_CONTINUED
34099#define POLL_IN POLL_IN
34100#define POLL_OUT POLL_OUT
34101#define POLL_MSG POLL_MSG
34102#define POLL_ERR POLL_ERR
34103#define POLL_PRI POLL_PRI
34104#define POLL_HUP POLL_HUP
34105#define _BITS_SIGINFO_CONSTS_ARCH_H 1
34106#define __sigval_t_defined
34107#define __sigevent_t_defined 1
34108#define __WORDSIZE 64
34109#define __WORDSIZE_TIME64_COMPAT32 1
34110#define __SYSCALL_WORDSIZE 64
34111#define __SIGEV_MAX_SIZE 64
34112#define __SIGEV_PAD_SIZE ((__SIGEV_MAX_SIZE / sizeof (int)) - 4)
34113#define sigev_notify_function _sigev_un._sigev_thread._function
34114#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
34115#define _BITS_SIGEVENT_CONSTS_H 1
34116#define SIGEV_SIGNAL SIGEV_SIGNAL
34117#define SIGEV_NONE SIGEV_NONE
34118#define SIGEV_THREAD SIGEV_THREAD
34119#define SIGEV_THREAD_ID SIGEV_THREAD_ID
34120#define sigmask(sig) ((int)(1u << ((sig) - 1)))
34121#define NSIG _NSIG
34122#define _BITS_SIGACTION_H 1
34123#define sa_handler __sigaction_handler.sa_handler
34124#define sa_sigaction __sigaction_handler.sa_sigaction
34125#define SA_NOCLDSTOP 1
34126#define SA_NOCLDWAIT 2
34127#define SA_SIGINFO 4
34128#define SA_ONSTACK 0x08000000
34129#define SA_RESTART 0x10000000
34130#define SA_NODEFER 0x40000000
34131#define SA_RESETHAND 0x80000000
34132#define SA_INTERRUPT 0x20000000
34133#define SA_NOMASK SA_NODEFER
34134#define SA_ONESHOT SA_RESETHAND
34135#define SA_STACK SA_ONSTACK
34136#define SIG_BLOCK 0
34137#define SIG_UNBLOCK 1
34138#define SIG_SETMASK 2
34139#define _BITS_SIGCONTEXT_H 1
34140#define FP_XSTATE_MAGIC1 0x46505853U
34141#define FP_XSTATE_MAGIC2 0x46505845U
34142#define FP_XSTATE_MAGIC2_SIZE sizeof (FP_XSTATE_MAGIC2)
34143#define __need_size_t
34144#undef __need_size_t
34145#define __stack_t_defined 1
34146#define __need_size_t
34147#undef __need_size_t
34148#define _SYS_UCONTEXT_H 1
34149#define __ctx(fld) fld
34150#define __NGREG 23
34151#define NGREG __NGREG
34152#define REG_R8 REG_R8
34153#define REG_R9 REG_R9
34154#define REG_R10 REG_R10
34155#define REG_R11 REG_R11
34156#define REG_R12 REG_R12
34157#define REG_R13 REG_R13
34158#define REG_R14 REG_R14
34159#define REG_R15 REG_R15
34160#define REG_RDI REG_RDI
34161#define REG_RSI REG_RSI
34162#define REG_RBP REG_RBP
34163#define REG_RBX REG_RBX
34164#define REG_RDX REG_RDX
34165#define REG_RAX REG_RAX
34166#define REG_RCX REG_RCX
34167#define REG_RSP REG_RSP
34168#define REG_RIP REG_RIP
34169#define REG_EFL REG_EFL
34170#define REG_CSGSFS REG_CSGSFS
34171#define REG_ERR REG_ERR
34172#define REG_TRAPNO REG_TRAPNO
34173#define REG_OLDMASK REG_OLDMASK
34174#define REG_CR2 REG_CR2
34175#undef __ctx
34176#define _BITS_SIGSTACK_H 1
34177#define MINSIGSTKSZ 2048
34178#define SIGSTKSZ 8192
34179#define _BITS_SS_FLAGS_H 1
34180#define SS_ONSTACK SS_ONSTACK
34181#define SS_DISABLE SS_DISABLE
34182#define __sigstack_defined 1
34183#define _BITS_SIGTHREAD_H 1
34184#define SIGRTMIN (__libc_current_sigrtmin ())
34185#define SIGRTMAX (__libc_current_sigrtmax ())
34186#define RUBY_TOPLEVEL_ASSERT_H
34187#undef assert
34188#define assert RUBY_ASSERT_NDEBUG
34189#define VM_ASSERT(expr) ((void)0)
34190#define VM_UNREACHABLE(func) UNREACHABLE
34191#define _SETJMP_H 1
34192#define _BITS_SETJMP_H 1
34193#define __WORDSIZE 64
34194#define __WORDSIZE_TIME64_COMPAT32 1
34195#define __SYSCALL_WORDSIZE 64
34196#define setjmp(env) _setjmp (env)
34197#define sigsetjmp(env,savemask) __sigsetjmp (env, savemask)
34198#define CCAN_LIST_H
34199#undef _ASSERT_H
34200#undef assert
34201#undef __ASSERT_VOID_CAST
34202#undef assert_perror
34203#define _ASSERT_H 1
34204#define __ASSERT_VOID_CAST (void)
34205#define assert(expr) (__ASSERT_VOID_CAST (0))
34206#define assert_perror(errnum) (__ASSERT_VOID_CAST (0))
34207#undef static_assert
34208#define static_assert _Static_assert
34209#define CCAN_STR_H
34210#define stringify(expr) stringify_1(expr)
34211#define stringify_1(expr) #expr
34212#define CCAN_CONTAINER_OF_H
34213#define CCAN_CHECK_TYPE_H
34214#define check_type(expr,type) ((typeof(expr) *)0 != (type *)0)
34215#define check_types_match(expr1,expr2) ((typeof(expr1) *)0 != (typeof(expr2) *)0)
34216#define container_of(member_ptr,containing_type,member) ((containing_type *) ((char *)(member_ptr) - container_off(containing_type, member)) + check_types_match(*(member_ptr), ((containing_type *)0)->member))
34217#define container_of_or_null(member_ptr,containing_type,member) ((containing_type *) container_of_or_null_(member_ptr, container_off(containing_type, member)) + check_types_match(*(member_ptr), ((containing_type *)0)->member))
34218#define container_off(containing_type,member) offsetof(containing_type, member)
34219#define container_of_var(member_ptr,container_var,member) container_of(member_ptr, typeof(*container_var), member)
34220#define container_off_var(var,member) container_off(typeof(*var), member)
34221#define LIST_LOC __FILE__ ":" stringify(__LINE__)
34222#define list_debug(h,loc) ((void)loc, h)
34223#define list_debug_node(n,loc) ((void)loc, n)
34224#define LIST_HEAD_INIT(name) { { &(name).n, &(name).n } }
34225#define LIST_HEAD(name) struct list_head name = LIST_HEAD_INIT(name)
34226#define list_add_after(h,p,n) list_add_after_(h, p, n, LIST_LOC)
34227#define list_add(h,n) list_add_(h, n, LIST_LOC)
34228#define list_add_before(h,p,n) list_add_before_(h, p, n, LIST_LOC)
34229#define list_add_tail(h,n) list_add_tail_(h, n, LIST_LOC)
34230#define list_empty(h) list_empty_(h, LIST_LOC)
34231#define list_empty_nodebug(h) list_empty(h)
34232#define list_del(n) list_del_(n, LIST_LOC)
34233#define list_del_init(n) list_del_init_(n, LIST_LOC)
34234#define list_swap(o,n) list_swap_(o, n, LIST_LOC)
34235#define list_entry(n,type,member) container_of(n, type, member)
34236#define list_top(h,type,member) ((type *)list_top_((h), list_off_(type, member)))
34237#define list_pop(h,type,member) ((type *)list_pop_((h), list_off_(type, member)))
34238#define list_tail(h,type,member) ((type *)list_tail_((h), list_off_(type, member)))
34239#define list_for_each(h,i,member) list_for_each_off(h, i, list_off_var_(i, member))
34240#define list_for_each_rev(h,i,member) list_for_each_rev_off(h, i, list_off_var_(i, member))
34241#define list_for_each_rev_safe(h,i,nxt,member) list_for_each_rev_safe_off(h, i, nxt, list_off_var_(i, member))
34242#define list_for_each_safe(h,i,nxt,member) list_for_each_safe_off(h, i, nxt, list_off_var_(i, member))
34243#define list_next(h,i,member) ((list_typeof(i))list_entry_or_null(list_debug(h, __FILE__ ":" stringify(__LINE__)), (i)->member.next, list_off_var_((i), member)))
34244#define list_prev(h,i,member) ((list_typeof(i))list_entry_or_null(list_debug(h, __FILE__ ":" stringify(__LINE__)), (i)->member.prev, list_off_var_((i), member)))
34245#define list_append_list(t,f) list_append_list_(t, f, __FILE__ ":" stringify(__LINE__))
34246#define list_prepend_list(t,f) list_prepend_list_(t, f, LIST_LOC)
34247#define list_for_each_off_dir_(h,i,off,dir) for (i = list_node_to_off_(list_debug(h, LIST_LOC)->n.dir, (off)); list_node_from_off_((void *)i, (off)) != &(h)->n; i = list_node_to_off_(list_node_from_off_((void *)i, (off))->dir, (off)))
34248#define list_for_each_safe_off_dir_(h,i,nxt,off,dir) for (i = list_node_to_off_(list_debug(h, LIST_LOC)->n.dir, (off)), nxt = list_node_to_off_(list_node_from_off_(i, (off))->dir, (off)); list_node_from_off_(i, (off)) != &(h)->n; i = nxt, nxt = list_node_to_off_(list_node_from_off_(i, (off))->dir, (off)))
34249#define list_for_each_off(h,i,off) list_for_each_off_dir_((h),(i),(off),next)
34250#define list_for_each_rev_off(h,i,off) list_for_each_off_dir_((h),(i),(off),prev)
34251#define list_for_each_safe_off(h,i,nxt,off) list_for_each_safe_off_dir_((h),(i),(nxt),(off),next)
34252#define list_for_each_rev_safe_off(h,i,nxt,off) list_for_each_safe_off_dir_((h),(i),(nxt),(off),prev)
34253#define list_entry_off(n,type,off) ((type *)list_node_from_off_((n), (off)))
34254#define list_head_off(h,type,off) ((type *)list_head_off((h), (off)))
34255#define list_tail_off(h,type,off) ((type *)list_tail_((h), (off)))
34256#define list_add_off(h,n,off) list_add((h), list_node_from_off_((n), (off)))
34257#define list_del_off(n,off) list_del(list_node_from_off_((n), (off)))
34258#define list_del_from_off(h,n,off) list_del_from(h, list_node_from_off_((n), (off)))
34259#define list_off_(type,member) (container_off(type, member) + check_type(((type *)0)->member, struct list_node))
34260#define list_off_var_(var,member) (container_off_var(var, member) + check_type(var->member, struct list_node))
34261#define list_typeof(var) typeof(var)
34262#define RUBY_ID_H
34263#define ID_STATIC_SYM RUBY_ID_STATIC_SYM
34264#define ID_SCOPE_SHIFT RUBY_ID_SCOPE_SHIFT
34265#define ID_SCOPE_MASK RUBY_ID_SCOPE_MASK
34266#define ID_LOCAL RUBY_ID_LOCAL
34267#define ID_INSTANCE RUBY_ID_INSTANCE
34268#define ID_GLOBAL RUBY_ID_GLOBAL
34269#define ID_ATTRSET RUBY_ID_ATTRSET
34270#define ID_CONST RUBY_ID_CONST
34271#define ID_CLASS RUBY_ID_CLASS
34272#define ID_JUNK RUBY_ID_JUNK
34273#define ID_INTERNAL RUBY_ID_INTERNAL
34274#define symIFUNC ID2SYM(idIFUNC)
34275#define symCFUNC ID2SYM(idCFUNC)
34276#define RUBY_TOKEN_DOT2 128
34277#define RUBY_TOKEN_DOT3 129
34278#define RUBY_TOKEN_BDOT2 130
34279#define RUBY_TOKEN_BDOT3 131
34280#define RUBY_TOKEN_UPLUS 132
34281#define RUBY_TOKEN_UMINUS 133
34282#define RUBY_TOKEN_POW 134
34283#define RUBY_TOKEN_CMP 135
34284#define RUBY_TOKEN_LSHFT 136
34285#define RUBY_TOKEN_RSHFT 137
34286#define RUBY_TOKEN_LEQ 138
34287#define RUBY_TOKEN_GEQ 139
34288#define RUBY_TOKEN_EQ 140
34289#define RUBY_TOKEN_EQQ 141
34290#define RUBY_TOKEN_NEQ 142
34291#define RUBY_TOKEN_MATCH 143
34292#define RUBY_TOKEN_NMATCH 144
34293#define RUBY_TOKEN_AREF 145
34294#define RUBY_TOKEN_ASET 146
34295#define RUBY_TOKEN_COLON2 147
34296#define RUBY_TOKEN_ANDOP 148
34297#define RUBY_TOKEN_OROP 149
34298#define RUBY_TOKEN_ANDDOT 150
34299#define RUBY_TOKEN(t) RUBY_TOKEN_##t
34300#define RUBY_TOKEN2ID_TYPE(tok,type) ((tok<<RUBY_ID_SCOPE_SHIFT)|type|RUBY_ID_STATIC_SYM)
34301#define TOKEN2LOCALID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_LOCAL)
34302#define TOKEN2INSTANCEID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_INSTANCE)
34303#define TOKEN2GLOBALID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_GLOBAL)
34304#define TOKEN2CONSTID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_CONST)
34305#define TOKEN2CLASSID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_CLASS)
34306#define TOKEN2ATTRSETID(tok) RUBY_TOKEN2ID_TYPE(tok, RUBY_ID_ATTRSET)
34307#define DEFINE_LOCALID_FROM_TOKEN(n) id##n = TOKEN2LOCALID(t##n)
34308#define DEFINE_INSTANCEID_FROM_TOKEN(n) id##n = TOKEN2INSTANCEID(t##n)
34309#define DEFINE_GLOBALID_FROM_TOKEN(n) id##n = TOKEN2GLOBALID(t##n)
34310#define DEFINE_CONSTID_FROM_TOKEN(n) id##n = TOKEN2CONSTID(t##n)
34311#define DEFINE_CLASSID_FROM_TOKEN(n) id##n = TOKEN2CLASSID(t##n)
34312#define DEFINE_ATTRSETID_FROM_TOKEN(n) id##n = TOKEN2ATTRSETID(t##n)
34313#define RUBY_INTERNAL_H 1
34314#define LIKELY(x) RB_LIKELY(x)
34315#define UNLIKELY(x) RB_UNLIKELY(x)
34316#define numberof(array) ((int)(sizeof(array) / sizeof((array)[0])))
34317#define roomof(x,y) (((x) + (y) - 1) / (y))
34318#define type_roomof(x,y) roomof(sizeof(x), sizeof(y))
34319#define ACCESS_ONCE(type,x) (*((volatile type *)&(x)))
34320#undef RARRAY_AREF
34321#undef RClass
34322#undef RCLASS_SUPER
34323#undef NEWOBJ_OF
34324#undef RB_NEWOBJ_OF
34325#undef RB_OBJ_WRITE
34326#undef RHASH_IFNONE
34327#undef RHASH_SIZE
34328#undef RHASH_TBL
34329#undef RHASH_EMPTY_P
34330#undef ROBJECT_IV_INDEX_TBL
34331#undef RSTRUCT_LEN
34332#undef RSTRUCT_PTR
34333#undef RSTRUCT_SET
34334#undef RSTRUCT_GET
34335#define rb_ary_new_from_args(...) rb_nonexistent_symbol(__VA_ARGS__)
34336#define rb_io_fptr_finalize(...) rb_nonexistent_symbol(__VA_ARGS__)
34337#define rb_fstring_cstr(...) rb_nonexistent_symbol(__VA_ARGS__)
34338#define rb_sym_intern_ascii_cstr(...) rb_nonexistent_symbol(__VA_ARGS__)
34339#define rb_funcallv(...) rb_nonexistent_symbol(__VA_ARGS__)
34340#define rb_method_basic_definition_p(...) rb_nonexistent_symbol(__VA_ARGS__)
34341#pragma GCC visibility push(default)
34342#pragma GCC visibility pop
34343#define rp(obj) rb_obj_info_dump_loc((VALUE)(obj), __FILE__, __LINE__, RUBY_FUNCTION_NAME_STRING)
34344#define rp_m(msg,obj) do { fprintf(stderr, "%s", (msg)); rb_obj_info_dump((VALUE)obj); } while (0)
34345#define bp() ruby_debug_breakpoint()
34346#define INTERNAL_ARRAY_H
34347#define INTERNAL_STATIC_ASSERT_H
34348#define STATIC_ASSERT RBIMPL_STATIC_ASSERT
34349#define ARRAY_DEBUG (0+RUBY_DEBUG)
34350#define RARRAY_PTR_IN_USE_FLAG FL_USER14
34351#pragma GCC visibility push(default)
34352#pragma GCC visibility pop
34353#pragma GCC visibility push(default)
34354#pragma GCC visibility pop
34355#undef rb_ary_new_from_args
34356#undef RARRAY_AREF
34357#define INTERNAL_SERIAL_H
34358#pragma clang diagnostic push
34359#pragma clang diagnostic ignored "-Wc++11-long-long"
34360#pragma clang diagnostic pop
34361#define SERIALT2NUM ULL2NUM
34362#define PRI_SERIALT_PREFIX PRI_LL_PREFIX
34363#define SIZEOF_SERIAL_T SIZEOF_LONG_LONG
34364#define INTERNAL_VM_H
34365#undef rb_funcallv
34366#undef rb_method_basic_definition_p
34367#pragma GCC visibility push(default)
34368#pragma GCC visibility pop
34369#pragma GCC visibility push(default)
34370#pragma GCC visibility pop
34371#pragma GCC visibility push(default)
34372#pragma GCC visibility pop
34373#pragma GCC visibility push(default)
34374#pragma GCC visibility pop
34375#pragma GCC visibility push(default)
34376#pragma GCC visibility pop
34377#define RUBY_DTRACE_CREATE_HOOK(name,arg) RUBY_DTRACE_HOOK(name##_CREATE, arg)
34378#define RUBY_DTRACE_HOOK(name,arg) do { if (UNLIKELY(RUBY_DTRACE_##name##_ENABLED())) { int dtrace_line; const char *dtrace_file = rb_source_location_cstr(&dtrace_line); if (!dtrace_file) dtrace_file = ""; RUBY_DTRACE_##name(arg, dtrace_file, dtrace_line); } } while (0)
34379#define RUBY_METHOD_H 1
34380#define INTERNAL_IMEMO_H
34381#define INTERNAL_GC_H
34382#define INTERNAL_COMPILERS_H
34383#define MSC_VERSION_SINCE(_) RBIMPL_COMPILER_SINCE(MSVC, (_) / 100, (_) % 100, 0)
34384#define MSC_VERSION_BEFORE(_) RBIMPL_COMPILER_BEFORE(MSVC, (_) / 100, (_) % 100, 0)
34385#define RB_OBJ_BUILTIN_TYPE(obj) rb_obj_builtin_type(obj)
34386#define OBJ_BUILTIN_TYPE(obj) RB_OBJ_BUILTIN_TYPE(obj)
34387#define rb_obj_builtin_type(obj) __extension__({ VALUE arg_obj = (obj); RB_SPECIAL_CONST_P(arg_obj) ? -1 : (int)RB_BUILTIN_TYPE(arg_obj); })
34388#define FLEX_ARY_LEN
34389#define BITFIELD(type,name,size) type name : size
34390#define RB_NEWOBJ_OF(var,T,c,f) T *(var) = (T *)(((f) & FL_WB_PROTECTED) ? rb_wb_protected_newobj_of((c), (f) & ~FL_WB_PROTECTED) : rb_wb_unprotected_newobj_of((c), (f)))
34391#define NEWOBJ_OF(var,T,c,f) RB_NEWOBJ_OF((var), T, (c), (f))
34392#define RB_OBJ_GC_FLAGS_MAX 6
34393#define INTERNAL_WARNINGS_H
34394#define COMPILER_WARNING_PUSH RBIMPL_WARNING_PUSH()
34395#define COMPILER_WARNING_POP RBIMPL_WARNING_POP()
34396#define COMPILER_WARNING_ERROR(flag) RBIMPL_WARNING_ERROR(flag)
34397#define COMPILER_WARNING_IGNORED(flag) RBIMPL_WARNING_IGNORED(flag)
34398#define UNALIGNED_MEMBER_ACCESS(expr) __extension__({ COMPILER_WARNING_PUSH; COMPILER_WARNING_IGNORED(-Waddress-of-packed-member); __typeof__(expr) unaligned_member_access_result = (expr); COMPILER_WARNING_POP; unaligned_member_access_result; })
34399#define UNALIGNED_MEMBER_PTR(ptr,mem) UNALIGNED_MEMBER_ACCESS(&(ptr)->mem)
34400#define RB_OBJ_WRITE(a,slot,b) UNALIGNED_MEMBER_ACCESS( rb_obj_write((VALUE)(a), (VALUE *)(slot), (VALUE)(b), __FILE__, __LINE__))
34401#pragma GCC visibility push(default)
34402#pragma GCC visibility pop
34403#pragma GCC visibility push(default)
34404#pragma GCC visibility pop
34405#define SIZED_REALLOC_N(x,y,z,w) REALLOC_N(x, y, z)
34406#define ruby_sized_xrealloc ruby_sized_xrealloc_inlined
34407#define ruby_sized_xrealloc2 ruby_sized_xrealloc2_inlined
34408#define ruby_sized_xfree ruby_sized_xfree_inlined
34409#define IMEMO_DEBUG 0
34410#define IMEMO_MASK 0x0f
34411#define IMEMO_FL_USHIFT (FL_USHIFT + 4)
34412#define IMEMO_FL_USER0 FL_USER4
34413#define IMEMO_FL_USER1 FL_USER5
34414#define IMEMO_FL_USER2 FL_USER6
34415#define IMEMO_FL_USER3 FL_USER7
34416#define IMEMO_FL_USER4 FL_USER8
34417#define IMEMO_FL_USER5 FL_USER9
34418#define THROW_DATA_CONSUMED IMEMO_FL_USER0
34419#define THROW_DATA_P(err) imemo_throw_data_p((VALUE)err)
34420#define MEMO_CAST(m) (R_CAST(MEMO)(m))
34421#define MEMO_NEW(a,b,c) ((struct MEMO *)rb_imemo_new(imemo_memo, (VALUE)(a), (VALUE)(b), (VALUE)(c), 0))
34422#define MEMO_FOR(type,value) ((type *)RARRAY_PTR(value))
34423#define NEW_MEMO_FOR(type,value) ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), MEMO_FOR(type, value))
34424#define NEW_PARTIAL_MEMO_FOR(type,value,member) ((value) = rb_ary_tmp_new_fill(type_roomof(type, VALUE)), rb_ary_set_len((value), offsetof(type, member) / sizeof(VALUE)), MEMO_FOR(type, value))
34425#pragma GCC visibility push(default)
34426#pragma GCC visibility pop
34427#define IMEMO_TYPE_P(v,t) imemo_type_p((VALUE)v, t)
34428#pragma clang diagnostic push
34429#pragma clang diagnostic ignored "-Waddress-of-packed-member"
34430#pragma clang diagnostic pop
34431#pragma clang diagnostic push
34432#pragma clang diagnostic ignored "-Waddress-of-packed-member"
34433#pragma clang diagnostic pop
34434#define END_OF_ENUMERATION(key)
34435#define METHOD_ENTRY_VISI(me) (rb_method_visibility_t)(((me)->flags & (IMEMO_FL_USER0 | IMEMO_FL_USER1)) >> (IMEMO_FL_USHIFT+0))
34436#define METHOD_ENTRY_BASIC(me) (int) (((me)->flags & (IMEMO_FL_USER2 )) >> (IMEMO_FL_USHIFT+2))
34437#define METHOD_ENTRY_COMPLEMENTED(me) ((me)->flags & IMEMO_FL_USER3)
34438#define METHOD_ENTRY_COMPLEMENTED_SET(me) ((me)->flags |= IMEMO_FL_USER3)
34439#define METHOD_ENTRY_CACHED(me) ((me)->flags & IMEMO_FL_USER4)
34440#define METHOD_ENTRY_CACHED_SET(me) ((me)->flags |= IMEMO_FL_USER4)
34441#define METHOD_ENTRY_INVALIDATED(me) ((me)->flags & IMEMO_FL_USER5)
34442#define METHOD_ENTRY_INVALIDATED_SET(me) ((me)->flags |= IMEMO_FL_USER5)
34443#define METHOD_ENTRY_CACHEABLE(me) !(METHOD_ENTRY_VISI(me) == METHOD_VISI_PROTECTED)
34444#define VM_METHOD_TYPE_MINIMUM_BITS 4
34445#define rb_iseq_t rb_iseq_t
34446#define UNDEFINED_METHOD_ENTRY_P(me) (!(me) || !(me)->def || (me)->def->type == VM_METHOD_TYPE_UNDEF)
34447#define UNDEFINED_REFINED_METHOD_P(def) ((def)->type == VM_METHOD_TYPE_REFINED && UNDEFINED_METHOD_ENTRY_P((def)->body.refined.orig_me))
34448#pragma GCC visibility push(default)
34449#pragma GCC visibility pop
34450#define RUBY_NODE_H 1
34451#define RNODE(obj) (R_CAST(RNode)(obj))
34452#define NODE_FL_NEWLINE (((VALUE)1)<<7)
34453#define NODE_TYPESHIFT 8
34454#define NODE_TYPEMASK (((VALUE)0x7f)<<NODE_TYPESHIFT)
34455#define nd_type(n) ((int) (((n)->flags & NODE_TYPEMASK)>>NODE_TYPESHIFT))
34456#define nd_set_type(n,t) (n)->flags=(((n)->flags&~NODE_TYPEMASK)|((((unsigned long)(t))<<NODE_TYPESHIFT)&NODE_TYPEMASK))
34457#define NODE_LSHIFT (NODE_TYPESHIFT+7)
34458#define NODE_LMASK (((SIGNED_VALUE)1<<(sizeof(VALUE)*CHAR_BIT-NODE_LSHIFT))-1)
34459#define nd_line(n) (int)(((SIGNED_VALUE)(n)->flags)>>NODE_LSHIFT)
34460#define nd_set_line(n,l) (n)->flags=(((n)->flags&~((VALUE)(-1)<<NODE_LSHIFT))|((VALUE)((l)&NODE_LMASK)<<NODE_LSHIFT))
34461#define nd_first_column(n) ((int)((n)->nd_loc.beg_pos.column))
34462#define nd_set_first_column(n,v) ((n)->nd_loc.beg_pos.column = (v))
34463#define nd_first_lineno(n) ((int)((n)->nd_loc.beg_pos.lineno))
34464#define nd_set_first_lineno(n,v) ((n)->nd_loc.beg_pos.lineno = (v))
34465#define nd_first_loc(n) ((n)->nd_loc.beg_pos)
34466#define nd_set_first_loc(n,v) (nd_first_loc(n) = (v))
34467#define nd_last_column(n) ((int)((n)->nd_loc.end_pos.column))
34468#define nd_set_last_column(n,v) ((n)->nd_loc.end_pos.column = (v))
34469#define nd_last_lineno(n) ((int)((n)->nd_loc.end_pos.lineno))
34470#define nd_set_last_lineno(n,v) ((n)->nd_loc.end_pos.lineno = (v))
34471#define nd_last_loc(n) ((n)->nd_loc.end_pos)
34472#define nd_set_last_loc(n,v) (nd_last_loc(n) = (v))
34473#define nd_node_id(n) ((n)->node_id)
34474#define nd_set_node_id(n,id) ((n)->node_id = (id))
34475#define nd_head u1.node
34476#define nd_alen u2.argc
34477#define nd_next u3.node
34478#define nd_cond u1.node
34479#define nd_body u2.node
34480#define nd_else u3.node
34481#define nd_resq u2.node
34482#define nd_ensr u3.node
34483#define nd_1st u1.node
34484#define nd_2nd u2.node
34485#define nd_stts u1.node
34486#define nd_entry u3.id
34487#define nd_vid u1.id
34488#define nd_cflag u2.id
34489#define nd_cval u3.value
34490#define nd_oid u1.id
34491#define nd_tbl u1.tbl
34492#define nd_var u1.node
34493#define nd_iter u3.node
34494#define nd_value u2.node
34495#define nd_aid u3.id
34496#define nd_lit u1.value
34497#define nd_rest u1.id
34498#define nd_opt u1.node
34499#define nd_pid u1.id
34500#define nd_plen u2.argc
34501#define nd_recv u1.node
34502#define nd_mid u2.id
34503#define nd_args u3.node
34504#define nd_ainfo u3.args
34505#define nd_defn u3.node
34506#define nd_cpath u1.node
34507#define nd_super u3.node
34508#define nd_beg u1.node
34509#define nd_end u2.node
34510#define nd_state u3.state
34511#define nd_rval u2.value
34512#define nd_nth u2.argc
34513#define nd_tag u1.id
34514#define nd_alias u1.id
34515#define nd_orig u2.id
34516#define nd_undef u2.node
34517#define nd_brace u2.argc
34518#define nd_pkwargs u1.node
34519#define nd_pconst u2.node
34520#define nd_pkwrestarg u3.node
34521#define nd_apinfo u3.apinfo
34522#define nd_fpinfo u3.fpinfo
34523#define NEW_NODE(t,a0,a1,a2,loc) rb_node_newnode((t),(VALUE)(a0),(VALUE)(a1),(VALUE)(a2),loc)
34524#define NEW_NODE_WITH_LOCALS(t,a1,a2,loc) node_newnode_with_locals(p, (t),(VALUE)(a1),(VALUE)(a2),loc)
34525#define NEW_DEFN(i,a,d,loc) NEW_NODE(NODE_DEFN,0,i,NEW_SCOPE(a,d,loc),loc)
34526#define NEW_DEFS(r,i,a,d,loc) NEW_NODE(NODE_DEFS,r,i,NEW_SCOPE(a,d,loc),loc)
34527#define NEW_SCOPE(a,b,loc) NEW_NODE_WITH_LOCALS(NODE_SCOPE,b,a,loc)
34528#define NEW_BLOCK(a,loc) NEW_NODE(NODE_BLOCK,a,0,0,loc)
34529#define NEW_IF(c,t,e,loc) NEW_NODE(NODE_IF,c,t,e,loc)
34530#define NEW_UNLESS(c,t,e,loc) NEW_NODE(NODE_UNLESS,c,t,e,loc)
34531#define NEW_CASE(h,b,loc) NEW_NODE(NODE_CASE,h,b,0,loc)
34532#define NEW_CASE2(b,loc) NEW_NODE(NODE_CASE2,0,b,0,loc)
34533#define NEW_CASE3(h,b,loc) NEW_NODE(NODE_CASE3,h,b,0,loc)
34534#define NEW_WHEN(c,t,e,loc) NEW_NODE(NODE_WHEN,c,t,e,loc)
34535#define NEW_IN(c,t,e,loc) NEW_NODE(NODE_IN,c,t,e,loc)
34536#define NEW_WHILE(c,b,n,loc) NEW_NODE(NODE_WHILE,c,b,n,loc)
34537#define NEW_UNTIL(c,b,n,loc) NEW_NODE(NODE_UNTIL,c,b,n,loc)
34538#define NEW_FOR(i,b,loc) NEW_NODE(NODE_FOR,0,b,i,loc)
34539#define NEW_FOR_MASGN(v,loc) NEW_NODE(NODE_FOR_MASGN,v,0,0,loc)
34540#define NEW_ITER(a,b,loc) NEW_NODE(NODE_ITER,0,NEW_SCOPE(a,b,loc),0,loc)
34541#define NEW_LAMBDA(a,b,loc) NEW_NODE(NODE_LAMBDA,0,NEW_SCOPE(a,b,loc),0,loc)
34542#define NEW_BREAK(s,loc) NEW_NODE(NODE_BREAK,s,0,0,loc)
34543#define NEW_NEXT(s,loc) NEW_NODE(NODE_NEXT,s,0,0,loc)
34544#define NEW_REDO(loc) NEW_NODE(NODE_REDO,0,0,0,loc)
34545#define NEW_RETRY(loc) NEW_NODE(NODE_RETRY,0,0,0,loc)
34546#define NEW_BEGIN(b,loc) NEW_NODE(NODE_BEGIN,0,b,0,loc)
34547#define NEW_RESCUE(b,res,e,loc) NEW_NODE(NODE_RESCUE,b,res,e,loc)
34548#define NEW_RESBODY(a,ex,n,loc) NEW_NODE(NODE_RESBODY,n,ex,a,loc)
34549#define NEW_ENSURE(b,en,loc) NEW_NODE(NODE_ENSURE,b,0,en,loc)
34550#define NEW_RETURN(s,loc) NEW_NODE(NODE_RETURN,s,0,0,loc)
34551#define NEW_YIELD(a,loc) NEW_NODE(NODE_YIELD,a,0,0,loc)
34552#define NEW_LIST(a,loc) NEW_NODE(NODE_LIST,a,1,0,loc)
34553#define NEW_ZLIST(loc) NEW_NODE(NODE_ZLIST,0,0,0,loc)
34554#define NEW_HASH(a,loc) NEW_NODE(NODE_HASH,a,0,0,loc)
34555#define NEW_MASGN(l,r,loc) NEW_NODE(NODE_MASGN,l,0,r,loc)
34556#define NEW_GASGN(v,val,loc) NEW_NODE(NODE_GASGN,v,val,v,loc)
34557#define NEW_LASGN(v,val,loc) NEW_NODE(NODE_LASGN,v,val,0,loc)
34558#define NEW_DASGN(v,val,loc) NEW_NODE(NODE_DASGN,v,val,0,loc)
34559#define NEW_DASGN_CURR(v,val,loc) NEW_NODE(NODE_DASGN_CURR,v,val,0,loc)
34560#define NEW_IASGN(v,val,loc) NEW_NODE(NODE_IASGN,v,val,0,loc)
34561#define NEW_CDECL(v,val,path,loc) NEW_NODE(NODE_CDECL,v,val,path,loc)
34562#define NEW_CVASGN(v,val,loc) NEW_NODE(NODE_CVASGN,v,val,0,loc)
34563#define NEW_OP_ASGN1(p,id,a,loc) NEW_NODE(NODE_OP_ASGN1,p,id,a,loc)
34564#define NEW_OP_ASGN2(r,t,i,o,val,loc) NEW_NODE(NODE_OP_ASGN2,r,val,NEW_OP_ASGN22(i,o,t,loc),loc)
34565#define NEW_OP_ASGN22(i,o,t,loc) NEW_NODE(NODE_OP_ASGN2,i,o,t,loc)
34566#define NEW_OP_ASGN_OR(i,val,loc) NEW_NODE(NODE_OP_ASGN_OR,i,val,0,loc)
34567#define NEW_OP_ASGN_AND(i,val,loc) NEW_NODE(NODE_OP_ASGN_AND,i,val,0,loc)
34568#define NEW_OP_CDECL(v,op,val,loc) NEW_NODE(NODE_OP_CDECL,v,val,op,loc)
34569#define NEW_GVAR(v,loc) NEW_NODE(NODE_GVAR,v,0,v,loc)
34570#define NEW_LVAR(v,loc) NEW_NODE(NODE_LVAR,v,0,0,loc)
34571#define NEW_DVAR(v,loc) NEW_NODE(NODE_DVAR,v,0,0,loc)
34572#define NEW_IVAR(v,loc) NEW_NODE(NODE_IVAR,v,0,0,loc)
34573#define NEW_CONST(v,loc) NEW_NODE(NODE_CONST,v,0,0,loc)
34574#define NEW_CVAR(v,loc) NEW_NODE(NODE_CVAR,v,0,0,loc)
34575#define NEW_NTH_REF(n,loc) NEW_NODE(NODE_NTH_REF,0,n,0,loc)
34576#define NEW_BACK_REF(n,loc) NEW_NODE(NODE_BACK_REF,0,n,0,loc)
34577#define NEW_MATCH(c,loc) NEW_NODE(NODE_MATCH,c,0,0,loc)
34578#define NEW_MATCH2(n1,n2,loc) NEW_NODE(NODE_MATCH2,n1,n2,0,loc)
34579#define NEW_MATCH3(r,n2,loc) NEW_NODE(NODE_MATCH3,r,n2,0,loc)
34580#define NEW_LIT(l,loc) NEW_NODE(NODE_LIT,l,0,0,loc)
34581#define NEW_STR(s,loc) NEW_NODE(NODE_STR,s,0,0,loc)
34582#define NEW_DSTR(s,loc) NEW_NODE(NODE_DSTR,s,1,0,loc)
34583#define NEW_XSTR(s,loc) NEW_NODE(NODE_XSTR,s,0,0,loc)
34584#define NEW_DXSTR(s,loc) NEW_NODE(NODE_DXSTR,s,0,0,loc)
34585#define NEW_DSYM(s,loc) NEW_NODE(NODE_DSYM,s,0,0,loc)
34586#define NEW_EVSTR(n,loc) NEW_NODE(NODE_EVSTR,0,(n),0,loc)
34587#define NEW_CALL(r,m,a,loc) NEW_NODE(NODE_CALL,r,m,a,loc)
34588#define NEW_OPCALL(r,m,a,loc) NEW_NODE(NODE_OPCALL,r,m,a,loc)
34589#define NEW_FCALL(m,a,loc) NEW_NODE(NODE_FCALL,0,m,a,loc)
34590#define NEW_VCALL(m,loc) NEW_NODE(NODE_VCALL,0,m,0,loc)
34591#define NEW_SUPER(a,loc) NEW_NODE(NODE_SUPER,0,0,a,loc)
34592#define NEW_ZSUPER(loc) NEW_NODE(NODE_ZSUPER,0,0,0,loc)
34593#define NEW_ARGS_AUX(r,b,loc) NEW_NODE(NODE_ARGS_AUX,r,b,0,loc)
34594#define NEW_OPT_ARG(i,v,loc) NEW_NODE(NODE_OPT_ARG,i,v,0,loc)
34595#define NEW_KW_ARG(i,v,loc) NEW_NODE(NODE_KW_ARG,i,v,0,loc)
34596#define NEW_POSTARG(i,v,loc) NEW_NODE(NODE_POSTARG,i,v,0,loc)
34597#define NEW_ARGSCAT(a,b,loc) NEW_NODE(NODE_ARGSCAT,a,b,0,loc)
34598#define NEW_ARGSPUSH(a,b,loc) NEW_NODE(NODE_ARGSPUSH,a,b,0,loc)
34599#define NEW_SPLAT(a,loc) NEW_NODE(NODE_SPLAT,a,0,0,loc)
34600#define NEW_BLOCK_PASS(b,loc) NEW_NODE(NODE_BLOCK_PASS,0,b,0,loc)
34601#define NEW_ALIAS(n,o,loc) NEW_NODE(NODE_ALIAS,n,o,0,loc)
34602#define NEW_VALIAS(n,o,loc) NEW_NODE(NODE_VALIAS,n,o,0,loc)
34603#define NEW_UNDEF(i,loc) NEW_NODE(NODE_UNDEF,0,i,0,loc)
34604#define NEW_CLASS(n,b,s,loc) NEW_NODE(NODE_CLASS,n,NEW_SCOPE(0,b,loc),(s),loc)
34605#define NEW_SCLASS(r,b,loc) NEW_NODE(NODE_SCLASS,r,NEW_SCOPE(0,b,loc),0,loc)
34606#define NEW_MODULE(n,b,loc) NEW_NODE(NODE_MODULE,n,NEW_SCOPE(0,b,loc),0,loc)
34607#define NEW_COLON2(c,i,loc) NEW_NODE(NODE_COLON2,c,i,0,loc)
34608#define NEW_COLON3(i,loc) NEW_NODE(NODE_COLON3,0,i,0,loc)
34609#define NEW_DOT2(b,e,loc) NEW_NODE(NODE_DOT2,b,e,0,loc)
34610#define NEW_DOT3(b,e,loc) NEW_NODE(NODE_DOT3,b,e,0,loc)
34611#define NEW_SELF(loc) NEW_NODE(NODE_SELF,0,0,1,loc)
34612#define NEW_NIL(loc) NEW_NODE(NODE_NIL,0,0,0,loc)
34613#define NEW_TRUE(loc) NEW_NODE(NODE_TRUE,0,0,0,loc)
34614#define NEW_FALSE(loc) NEW_NODE(NODE_FALSE,0,0,0,loc)
34615#define NEW_ERRINFO(loc) NEW_NODE(NODE_ERRINFO,0,0,0,loc)
34616#define NEW_DEFINED(e,loc) NEW_NODE(NODE_DEFINED,e,0,0,loc)
34617#define NEW_PREEXE(b,loc) NEW_SCOPE(b,loc)
34618#define NEW_POSTEXE(b,loc) NEW_NODE(NODE_POSTEXE,0,b,0,loc)
34619#define NEW_ATTRASGN(r,m,a,loc) NEW_NODE(NODE_ATTRASGN,r,m,a,loc)
34620#define NODE_SPECIAL_REQUIRED_KEYWORD ((NODE *)-1)
34621#define NODE_REQUIRED_KEYWORD_P(node) ((node)->nd_value == NODE_SPECIAL_REQUIRED_KEYWORD)
34622#define NODE_SPECIAL_NO_NAME_REST ((NODE *)-1)
34623#define NODE_NAMED_REST_P(node) ((node) != NODE_SPECIAL_NO_NAME_REST)
34624#define NODE_SPECIAL_EXCESSIVE_COMMA ((ID)1)
34625#define NODE_SPECIAL_NO_REST_KEYWORD ((NODE *)-1)
34626#pragma GCC visibility push(default)
34627#pragma GCC visibility pop
34628#define RUBY_ATOMIC_H
34629#define ATOMIC_FETCH_ADD(var,val) __atomic_fetch_add(&(var), (val), __ATOMIC_SEQ_CST)
34630#define ATOMIC_FETCH_SUB(var,val) __atomic_fetch_sub(&(var), (val), __ATOMIC_SEQ_CST)
34631#define ATOMIC_OR(var,val) __atomic_fetch_or(&(var), (val), __ATOMIC_SEQ_CST)
34632#define ATOMIC_EXCHANGE(var,val) __atomic_exchange_n(&(var), (val), __ATOMIC_SEQ_CST)
34633#define ATOMIC_CAS(var,oldval,newval) RB_GNUC_EXTENSION_BLOCK( __typeof__(var) oldvaldup = (oldval); __atomic_compare_exchange_n(&(var), &oldvaldup, (newval), 0, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST); oldvaldup )
34634#define RUBY_ATOMIC_GENERIC_MACRO 1
34635#define ATOMIC_SET(var,val) (void)ATOMIC_EXCHANGE(var, val)
34636#define ATOMIC_ADD(var,val) (void)ATOMIC_FETCH_ADD(var, val)
34637#define ATOMIC_SUB(var,val) (void)ATOMIC_FETCH_SUB(var, val)
34638#define ATOMIC_INC(var) ATOMIC_ADD(var, 1)
34639#define ATOMIC_DEC(var) ATOMIC_SUB(var, 1)
34640#define ATOMIC_SIZE_INC(var) ATOMIC_INC(var)
34641#define ATOMIC_SIZE_DEC(var) ATOMIC_DEC(var)
34642#define ATOMIC_SIZE_EXCHANGE(var,val) ATOMIC_EXCHANGE(var, val)
34643#define ATOMIC_SIZE_CAS(var,oldval,val) ATOMIC_CAS(var, oldval, val)
34644#define ATOMIC_SIZE_ADD(var,val) ATOMIC_ADD(var, val)
34645#define ATOMIC_SIZE_SUB(var,val) ATOMIC_SUB(var, val)
34646#define ATOMIC_PTR_EXCHANGE(var,val) ATOMIC_EXCHANGE(var, val)
34647#define ATOMIC_PTR_CAS(var,oldval,newval) ATOMIC_CAS(var, oldval, newval)
34648#define ATOMIC_VALUE_EXCHANGE(var,val) ATOMIC_EXCHANGE(var, val)
34649#define ATOMIC_VALUE_CAS(var,oldval,val) ATOMIC_CAS(var, oldval, val)
34650#define RUBY_VM_OPTS_H
34651#define OPT_TAILCALL_OPTIMIZATION 0
34652#define OPT_PEEPHOLE_OPTIMIZATION 1
34653#define OPT_SPECIALISED_INSTRUCTION 1
34654#define OPT_INLINE_CONST_CACHE 1
34655#define OPT_FROZEN_STRING_LITERAL 0
34656#define OPT_DEBUG_FROZEN_STRING_LITERAL 0
34657#define OPT_THREADED_CODE 0
34658#define OPT_DIRECT_THREADED_CODE (OPT_THREADED_CODE == 0)
34659#define OPT_TOKEN_THREADED_CODE (OPT_THREADED_CODE == 1)
34660#define OPT_CALL_THREADED_CODE (OPT_THREADED_CODE == 2)
34661#define OPT_CHECKED_RUN 1
34662#define OPT_INLINE_METHOD_CACHE 1
34663#define OPT_GLOBAL_METHOD_CACHE 1
34664#define OPT_BLOCKINLINING 0
34665#define OPT_IC_FOR_IVAR 1
34666#define OPT_OPERANDS_UNIFICATION 1
34667#define OPT_INSTRUCTIONS_UNIFICATION 0
34668#define OPT_UNIFY_ALL_COMBINATION 0
34669#define OPT_STACK_CACHING 0
34670#define OPT_SUPPORT_JOKE 0
34671#define OPT_SUPPORT_CALL_C_FUNCTION 0
34672#define VM_COLLECT_USAGE_DETAILS 0
34673#define RUBY_THREAD_NATIVE_H 1
34674#define _PTHREAD_H 1
34675#define _SCHED_H 1
34676#define __need_size_t
34677#define __need_NULL
34678#undef __need_size_t
34679#undef NULL
34680#define NULL ((void*)0)
34681#undef __need_NULL
34682#define _BITS_SCHED_H 1
34683#define SCHED_OTHER 0
34684#define SCHED_FIFO 1
34685#define SCHED_RR 2
34686#define SCHED_BATCH 3
34687#define SCHED_ISO 4
34688#define SCHED_IDLE 5
34689#define SCHED_DEADLINE 6
34690#define SCHED_RESET_ON_FORK 0x40000000
34691#define CSIGNAL 0x000000ff
34692#define CLONE_VM 0x00000100
34693#define CLONE_FS 0x00000200
34694#define CLONE_FILES 0x00000400
34695#define CLONE_SIGHAND 0x00000800
34696#define CLONE_PIDFD 0x00001000
34697#define CLONE_PTRACE 0x00002000
34698#define CLONE_VFORK 0x00004000
34699#define CLONE_PARENT 0x00008000
34700#define CLONE_THREAD 0x00010000
34701#define CLONE_NEWNS 0x00020000
34702#define CLONE_SYSVSEM 0x00040000
34703#define CLONE_SETTLS 0x00080000
34704#define CLONE_PARENT_SETTID 0x00100000
34705#define CLONE_CHILD_CLEARTID 0x00200000
34706#define CLONE_DETACHED 0x00400000
34707#define CLONE_UNTRACED 0x00800000
34708#define CLONE_CHILD_SETTID 0x01000000
34709#define CLONE_NEWCGROUP 0x02000000
34710#define CLONE_NEWUTS 0x04000000
34711#define CLONE_NEWIPC 0x08000000
34712#define CLONE_NEWUSER 0x10000000
34713#define CLONE_NEWPID 0x20000000
34714#define CLONE_NEWNET 0x40000000
34715#define CLONE_IO 0x80000000
34716#define _BITS_TYPES_STRUCT_SCHED_PARAM 1
34717#define _BITS_CPU_SET_H 1
34718#define __CPU_SETSIZE 1024
34719#define __NCPUBITS (8 * sizeof (__cpu_mask))
34720#define __CPUELT(cpu) ((cpu) / __NCPUBITS)
34721#define __CPUMASK(cpu) ((__cpu_mask) 1 << ((cpu) % __NCPUBITS))
34722#define __CPU_ZERO_S(setsize,cpusetp) do __builtin_memset (cpusetp, '\0', setsize); while (0)
34723#define __CPU_SET_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu / 8 < (setsize) ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] |= __CPUMASK (__cpu)) : 0; }))
34724#define __CPU_CLR_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu / 8 < (setsize) ? (((__cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] &= ~__CPUMASK (__cpu)) : 0; }))
34725#define __CPU_ISSET_S(cpu,setsize,cpusetp) (__extension__ ({ size_t __cpu = (cpu); __cpu / 8 < (setsize) ? ((((const __cpu_mask *) ((cpusetp)->__bits))[__CPUELT (__cpu)] & __CPUMASK (__cpu))) != 0 : 0; }))
34726#define __CPU_COUNT_S(setsize,cpusetp) __sched_cpucount (setsize, cpusetp)
34727#define __CPU_EQUAL_S(setsize,cpusetp1,cpusetp2) (__builtin_memcmp (cpusetp1, cpusetp2, setsize) == 0)
34728#define __CPU_OP_S(setsize,destset,srcset1,srcset2,op) (__extension__ ({ cpu_set_t *__dest = (destset); const __cpu_mask *__arr1 = (srcset1)->__bits; const __cpu_mask *__arr2 = (srcset2)->__bits; size_t __imax = (setsize) / sizeof (__cpu_mask); size_t __i; for (__i = 0; __i < __imax; ++__i) ((__cpu_mask *) __dest->__bits)[__i] = __arr1[__i] op __arr2[__i]; __dest; }))
34729#define __CPU_ALLOC_SIZE(count) ((((count) + __NCPUBITS - 1) / __NCPUBITS) * sizeof (__cpu_mask))
34730#define __CPU_ALLOC(count) __sched_cpualloc (count)
34731#define __CPU_FREE(cpuset) __sched_cpufree (cpuset)
34732#define sched_priority sched_priority
34733#define __sched_priority sched_priority
34734#define CPU_SETSIZE __CPU_SETSIZE
34735#define CPU_SET(cpu,cpusetp) __CPU_SET_S (cpu, sizeof (cpu_set_t), cpusetp)
34736#define CPU_CLR(cpu,cpusetp) __CPU_CLR_S (cpu, sizeof (cpu_set_t), cpusetp)
34737#define CPU_ISSET(cpu,cpusetp) __CPU_ISSET_S (cpu, sizeof (cpu_set_t), cpusetp)
34738#define CPU_ZERO(cpusetp) __CPU_ZERO_S (sizeof (cpu_set_t), cpusetp)
34739#define CPU_COUNT(cpusetp) __CPU_COUNT_S (sizeof (cpu_set_t), cpusetp)
34740#define CPU_SET_S(cpu,setsize,cpusetp) __CPU_SET_S (cpu, setsize, cpusetp)
34741#define CPU_CLR_S(cpu,setsize,cpusetp) __CPU_CLR_S (cpu, setsize, cpusetp)
34742#define CPU_ISSET_S(cpu,setsize,cpusetp) __CPU_ISSET_S (cpu, setsize, cpusetp)
34743#define CPU_ZERO_S(setsize,cpusetp) __CPU_ZERO_S (setsize, cpusetp)
34744#define CPU_COUNT_S(setsize,cpusetp) __CPU_COUNT_S (setsize, cpusetp)
34745#define CPU_EQUAL(cpusetp1,cpusetp2) __CPU_EQUAL_S (sizeof (cpu_set_t), cpusetp1, cpusetp2)
34746#define CPU_EQUAL_S(setsize,cpusetp1,cpusetp2) __CPU_EQUAL_S (setsize, cpusetp1, cpusetp2)
34747#define CPU_AND(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, &)
34748#define CPU_OR(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, |)
34749#define CPU_XOR(destset,srcset1,srcset2) __CPU_OP_S (sizeof (cpu_set_t), destset, srcset1, srcset2, ^)
34750#define CPU_AND_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, &)
34751#define CPU_OR_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, |)
34752#define CPU_XOR_S(setsize,destset,srcset1,srcset2) __CPU_OP_S (setsize, destset, srcset1, srcset2, ^)
34753#define CPU_ALLOC_SIZE(count) __CPU_ALLOC_SIZE (count)
34754#define CPU_ALLOC(count) __CPU_ALLOC (count)
34755#define CPU_FREE(cpuset) __CPU_FREE (cpuset)
34756#define __WORDSIZE 64
34757#define __WORDSIZE_TIME64_COMPAT32 1
34758#define __SYSCALL_WORDSIZE 64
34759#define PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_JOINABLE
34760#define PTHREAD_CREATE_DETACHED PTHREAD_CREATE_DETACHED
34761#define PTHREAD_MUTEX_INITIALIZER { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_TIMED_NP) } }
34762#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_RECURSIVE_NP) } }
34763#define PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_ERRORCHECK_NP) } }
34764#define PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP { { __PTHREAD_MUTEX_INITIALIZER (PTHREAD_MUTEX_ADAPTIVE_NP) } }
34765#define PTHREAD_RWLOCK_INITIALIZER { { __PTHREAD_RWLOCK_INITIALIZER (PTHREAD_RWLOCK_DEFAULT_NP) } }
34766#define PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP { { __PTHREAD_RWLOCK_INITIALIZER (PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP) } }
34767#define PTHREAD_INHERIT_SCHED PTHREAD_INHERIT_SCHED
34768#define PTHREAD_EXPLICIT_SCHED PTHREAD_EXPLICIT_SCHED
34769#define PTHREAD_SCOPE_SYSTEM PTHREAD_SCOPE_SYSTEM
34770#define PTHREAD_SCOPE_PROCESS PTHREAD_SCOPE_PROCESS
34771#define PTHREAD_PROCESS_PRIVATE PTHREAD_PROCESS_PRIVATE
34772#define PTHREAD_PROCESS_SHARED PTHREAD_PROCESS_SHARED
34773#define PTHREAD_COND_INITIALIZER { { {0}, {0}, {0, 0}, {0, 0}, 0, 0, {0, 0} } }
34774#define PTHREAD_CANCEL_ENABLE PTHREAD_CANCEL_ENABLE
34775#define PTHREAD_CANCEL_DISABLE PTHREAD_CANCEL_DISABLE
34776#define PTHREAD_CANCEL_DEFERRED PTHREAD_CANCEL_DEFERRED
34777#define PTHREAD_CANCEL_ASYNCHRONOUS PTHREAD_CANCEL_ASYNCHRONOUS
34778#define PTHREAD_CANCELED ((void *) -1)
34779#define PTHREAD_ONCE_INIT 0
34780#define PTHREAD_BARRIER_SERIAL_THREAD -1
34781#define __cleanup_fct_attribute
34782#define pthread_cleanup_push(routine,arg) do { __pthread_unwind_buf_t __cancel_buf; void (*__cancel_routine) (void *) = (routine); void *__cancel_arg = (arg); int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) __cancel_buf.__cancel_jmp_buf, 0); if (__glibc_unlikely (__not_first_call)) { __cancel_routine (__cancel_arg); __pthread_unwind_next (&__cancel_buf); } __pthread_register_cancel (&__cancel_buf); do {
34783#define pthread_cleanup_pop(execute) do { } while (0); } while (0); __pthread_unregister_cancel (&__cancel_buf); if (execute) __cancel_routine (__cancel_arg); } while (0)
34784#define pthread_cleanup_push_defer_np(routine,arg) do { __pthread_unwind_buf_t __cancel_buf; void (*__cancel_routine) (void *) = (routine); void *__cancel_arg = (arg); int __not_first_call = __sigsetjmp ((struct __jmp_buf_tag *) (void *) __cancel_buf.__cancel_jmp_buf, 0); if (__glibc_unlikely (__not_first_call)) { __cancel_routine (__cancel_arg); __pthread_unwind_next (&__cancel_buf); } __pthread_register_cancel_defer (&__cancel_buf); do {
34785#define pthread_cleanup_pop_restore_np(execute) do { } while (0); } while (0); __pthread_unregister_cancel_restore (&__cancel_buf); if (execute) __cancel_routine (__cancel_arg); } while (0)
34786#pragma GCC visibility push(default)
34787#pragma GCC visibility pop
34788#define RUBY_THREAD_PTHREAD_H
34789#define RB_NATIVETHREAD_LOCK_INIT PTHREAD_MUTEX_INITIALIZER
34790#define RB_NATIVETHREAD_COND_INIT PTHREAD_COND_INITIALIZER
34791#undef except
34792#undef try
34793#undef leave
34794#undef finally
34795#define RUBY_VM_THREAD_MODEL 2
34796#define VM_INSN_INFO_TABLE_IMPL 2
34797#define RUBY_NSIG NSIG
34798#define RUBY_SIGCHLD (SIGCLD)
34799#define SIGCHLD_LOSSY (0)
34800#define WAITPID_USE_SIGCHLD (RUBY_SIGCHLD || SIGCHLD_LOSSY)
34801#define USE_SIGALTSTACK
34802#define RB_ALTSTACK_INIT(var,altstack) var = rb_register_sigaltstack(altstack)
34803#define RB_ALTSTACK_FREE(var) xfree(var)
34804#define RB_ALTSTACK(var) var
34805#define TAG_NONE RUBY_TAG_NONE
34806#define TAG_RETURN RUBY_TAG_RETURN
34807#define TAG_BREAK RUBY_TAG_BREAK
34808#define TAG_NEXT RUBY_TAG_NEXT
34809#define TAG_RETRY RUBY_TAG_RETRY
34810#define TAG_REDO RUBY_TAG_REDO
34811#define TAG_RAISE RUBY_TAG_RAISE
34812#define TAG_THROW RUBY_TAG_THROW
34813#define TAG_FATAL RUBY_TAG_FATAL
34814#define TAG_MASK RUBY_TAG_MASK
34815#define CoreDataFromValue(obj,type) (type*)DATA_PTR(obj)
34816#define GetCoreDataFromValue(obj,type,ptr) ((ptr) = CoreDataFromValue((obj), type))
34817#define PATHOBJ_PATH 0
34818#define PATHOBJ_REALPATH 1
34819#define USE_LAZY_LOAD 0
34820#define GetVMPtr(obj,ptr) GetCoreDataFromValue((obj), rb_vm_t, (ptr))
34821#define RUBY_VM_SIZE_ALIGN 4096
34822#define RUBY_VM_THREAD_VM_STACK_SIZE ( 128 * 1024 * sizeof(VALUE))
34823#define RUBY_VM_THREAD_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE))
34824#define RUBY_VM_THREAD_MACHINE_STACK_SIZE ( 128 * 1024 * sizeof(VALUE))
34825#define RUBY_VM_THREAD_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE))
34826#define RUBY_VM_FIBER_VM_STACK_SIZE ( 16 * 1024 * sizeof(VALUE))
34827#define RUBY_VM_FIBER_VM_STACK_SIZE_MIN ( 2 * 1024 * sizeof(VALUE))
34828#define RUBY_VM_FIBER_MACHINE_STACK_SIZE ( 64 * 1024 * sizeof(VALUE))
34829#define RUBY_VM_FIBER_MACHINE_STACK_SIZE_MIN ( 16 * 1024 * sizeof(VALUE))
34830#define INTEGER_REDEFINED_OP_FLAG (1 << 0)
34831#define FLOAT_REDEFINED_OP_FLAG (1 << 1)
34832#define STRING_REDEFINED_OP_FLAG (1 << 2)
34833#define ARRAY_REDEFINED_OP_FLAG (1 << 3)
34834#define HASH_REDEFINED_OP_FLAG (1 << 4)
34835#define SYMBOL_REDEFINED_OP_FLAG (1 << 6)
34836#define TIME_REDEFINED_OP_FLAG (1 << 7)
34837#define REGEXP_REDEFINED_OP_FLAG (1 << 8)
34838#define NIL_REDEFINED_OP_FLAG (1 << 9)
34839#define TRUE_REDEFINED_OP_FLAG (1 << 10)
34840#define FALSE_REDEFINED_OP_FLAG (1 << 11)
34841#define PROC_REDEFINED_OP_FLAG (1 << 12)
34842#define BASIC_OP_UNREDEFINED_P(op,klass) (LIKELY((GET_VM()->redefined_flag[(op)]&(klass)) == 0))
34843#define VM_DEBUG_BP_CHECK 0
34844#define VM_DEBUG_VERIFY_METHOD_CACHE (VMDEBUG != 0)
34845#define rb_execution_context_t rb_execution_context_t
34846#define VM_CORE_H_EC_DEFINED 1
34847#define VM_DEFINECLASS_TYPE(x) ((rb_vm_defineclass_type_t)(x) & VM_DEFINECLASS_TYPE_MASK)
34848#define VM_DEFINECLASS_FLAG_SCOPED 0x08
34849#define VM_DEFINECLASS_FLAG_HAS_SUPERCLASS 0x10
34850#define VM_DEFINECLASS_SCOPED_P(x) ((x) & VM_DEFINECLASS_FLAG_SCOPED)
34851#define VM_DEFINECLASS_HAS_SUPERCLASS_P(x) ((x) & VM_DEFINECLASS_FLAG_HAS_SUPERCLASS)
34852#pragma GCC visibility push(default)
34853#pragma GCC visibility pop
34854#define GetProcPtr(obj,ptr) GetCoreDataFromValue((obj), rb_proc_t, (ptr))
34855#define GetBindingPtr(obj,ptr) GetCoreDataFromValue((obj), rb_binding_t, (ptr))
34856#define VM_CHECKMATCH_TYPE_MASK 0x03
34857#define VM_CHECKMATCH_ARRAY 0x04
34858#define FUNC_FASTCALL(x) x
34859#define VM_TAGGED_PTR_SET(p,tag) ((VALUE)(p) | (tag))
34860#define VM_TAGGED_PTR_REF(v,mask) ((void *)((v) & ~mask))
34861#define GC_GUARDED_PTR(p) VM_TAGGED_PTR_SET((p), 0x01)
34862#define GC_GUARDED_PTR_REF(p) VM_TAGGED_PTR_REF((p), 0x03)
34863#define GC_GUARDED_PTR_P(p) (((VALUE)(p)) & 0x01)
34864#define VM_ENV_DATA_SIZE ( 3)
34865#define VM_ENV_DATA_INDEX_ME_CREF (-2)
34866#define VM_ENV_DATA_INDEX_SPECVAL (-1)
34867#define VM_ENV_DATA_INDEX_FLAGS ( 0)
34868#define VM_ENV_DATA_INDEX_ENV ( 1)
34869#define VM_ENV_INDEX_LAST_LVAR (-VM_ENV_DATA_SIZE)
34870#define RUBYVM_CFUNC_FRAME_P(cfp) (VM_FRAME_TYPE(cfp) == VM_FRAME_MAGIC_CFUNC)
34871#define VM_GUARDED_PREV_EP(ep) GC_GUARDED_PTR(ep)
34872#define VM_BLOCK_HANDLER_NONE 0
34873#define RUBY_VM_PREVIOUS_CONTROL_FRAME(cfp) ((cfp)+1)
34874#define RUBY_VM_NEXT_CONTROL_FRAME(cfp) ((cfp)-1)
34875#define RUBY_VM_VALID_CONTROL_FRAME_P(cfp,ecfp) ((void *)(ecfp) > (void *)(cfp))
34876#define SDR() rb_vmdebug_stack_dump_raw(GET_EC(), GET_EC()->cfp)
34877#define SDR2(cfp) rb_vmdebug_stack_dump_raw(GET_EC(), (cfp))
34878#pragma GCC visibility push(default)
34879#pragma GCC visibility pop
34880#define rb_vm_register_special_exception(sp,e,m) rb_vm_register_special_exception_str(sp, e, rb_usascii_str_new_static((m), (long)rb_strlen_lit(m)))
34881#define sysstack_error GET_VM()->special_exceptions[ruby_error_sysstack]
34882#define CHECK_VM_STACK_OVERFLOW0(cfp,sp,margin) do { STATIC_ASSERT(sizeof_sp, sizeof(*(sp)) == sizeof(VALUE)); STATIC_ASSERT(sizeof_cfp, sizeof(*(cfp)) == sizeof(rb_control_frame_t)); const struct rb_control_frame_struct *bound = (void *)&(sp)[(margin)]; if (UNLIKELY((cfp) <= &bound[1])) { vm_stackoverflow(); } } while (0)
34883#define CHECK_VM_STACK_OVERFLOW(cfp,margin) CHECK_VM_STACK_OVERFLOW0((cfp), (cfp)->sp, (margin))
34884#pragma GCC visibility push(default)
34885#pragma GCC visibility pop
34886#define GET_VM() rb_current_vm()
34887#define GET_THREAD() rb_current_thread()
34888#define GET_EC() rb_current_execution_context()
34889#define RUBY_VM_SET_TIMER_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TIMER_INTERRUPT_MASK)
34890#define RUBY_VM_SET_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, PENDING_INTERRUPT_MASK)
34891#define RUBY_VM_SET_POSTPONED_JOB_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, POSTPONED_JOB_INTERRUPT_MASK)
34892#define RUBY_VM_SET_TRAP_INTERRUPT(ec) ATOMIC_OR((ec)->interrupt_flag, TRAP_INTERRUPT_MASK)
34893#define RUBY_VM_INTERRUPTED(ec) ((ec)->interrupt_flag & ~(ec)->interrupt_mask & (PENDING_INTERRUPT_MASK|TRAP_INTERRUPT_MASK))
34894#define RUBY_VM_INTERRUPTED_ANY(ec) ((ec)->interrupt_flag & ~(ec)->interrupt_mask)
34895#define RUBY_VM_CHECK_INTS(ec) rb_vm_check_ints(ec)
34896#define EXEC_EVENT_HOOK_ORIG(ec_,hooks_,flag_,self_,id_,called_id_,klass_,data_,pop_p_) do { const rb_event_flag_t flag_arg_ = (flag_); rb_hook_list_t *hooks_arg_ = (hooks_); if (UNLIKELY((hooks_arg_)->events & (flag_arg_))) { rb_exec_event_hook_orig(ec_, hooks_arg_, flag_arg_, self_, id_, called_id_, klass_, data_, pop_p_); } } while (0)
34897#define EXEC_EVENT_HOOK(ec_,flag_,self_,id_,called_id_,klass_,data_) EXEC_EVENT_HOOK_ORIG(ec_, rb_vm_global_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 0)
34898#define EXEC_EVENT_HOOK_AND_POP_FRAME(ec_,flag_,self_,id_,called_id_,klass_,data_) EXEC_EVENT_HOOK_ORIG(ec_, rb_vm_global_hooks(ec_), flag_, self_, id_, called_id_, klass_, data_, 1)
34899#pragma GCC visibility push(default)
34900#define RUBY_EVENT_COVERAGE_LINE 0x010000
34901#define RUBY_EVENT_COVERAGE_BRANCH 0x020000
34902#pragma GCC visibility pop
34903#define PASS_PASSED_BLOCK_HANDLER_EC(ec) pass_passed_block_handler(ec)
34904#define PASS_PASSED_BLOCK_HANDLER() pass_passed_block_handler(GET_EC())
34905#define ruby_setjmp(env) RUBY_SETJMP(env)
34906#define ruby_longjmp(env,val) RUBY_LONGJMP((env),(val))
34907#define _ERRNO_H 1
34908#define _BITS_ERRNO_H 1
34909#define _ASM_GENERIC_ERRNO_H
34910#define _ASM_GENERIC_ERRNO_BASE_H
34911#define EPERM 1
34912#define ENOENT 2
34913#define ESRCH 3
34914#define EINTR 4
34915#define EIO 5
34916#define ENXIO 6
34917#define E2BIG 7
34918#define ENOEXEC 8
34919#define EBADF 9
34920#define ECHILD 10
34921#define EAGAIN 11
34922#define ENOMEM 12
34923#define EACCES 13
34924#define EFAULT 14
34925#define ENOTBLK 15
34926#define EBUSY 16
34927#define EEXIST 17
34928#define EXDEV 18
34929#define ENODEV 19
34930#define ENOTDIR 20
34931#define EISDIR 21
34932#define EINVAL 22
34933#define ENFILE 23
34934#define EMFILE 24
34935#define ENOTTY 25
34936#define ETXTBSY 26
34937#define EFBIG 27
34938#define ENOSPC 28
34939#define ESPIPE 29
34940#define EROFS 30
34941#define EMLINK 31
34942#define EPIPE 32
34943#define EDOM 33
34944#define ERANGE 34
34945#define EDEADLK 35
34946#define ENAMETOOLONG 36
34947#define ENOLCK 37
34948#define ENOSYS 38
34949#define ENOTEMPTY 39
34950#define ELOOP 40
34951#define EWOULDBLOCK EAGAIN
34952#define ENOMSG 42
34953#define EIDRM 43
34954#define ECHRNG 44
34955#define EL2NSYNC 45
34956#define EL3HLT 46
34957#define EL3RST 47
34958#define ELNRNG 48
34959#define EUNATCH 49
34960#define ENOCSI 50
34961#define EL2HLT 51
34962#define EBADE 52
34963#define EBADR 53
34964#define EXFULL 54
34965#define ENOANO 55
34966#define EBADRQC 56
34967#define EBADSLT 57
34968#define EDEADLOCK EDEADLK
34969#define EBFONT 59
34970#define ENOSTR 60
34971#define ENODATA 61
34972#define ETIME 62
34973#define ENOSR 63
34974#define ENONET 64
34975#define ENOPKG 65
34976#define EREMOTE 66
34977#define ENOLINK 67
34978#define EADV 68
34979#define ESRMNT 69
34980#define ECOMM 70
34981#define EPROTO 71
34982#define EMULTIHOP 72
34983#define EDOTDOT 73
34984#define EBADMSG 74
34985#define EOVERFLOW 75
34986#define ENOTUNIQ 76
34987#define EBADFD 77
34988#define EREMCHG 78
34989#define ELIBACC 79
34990#define ELIBBAD 80
34991#define ELIBSCN 81
34992#define ELIBMAX 82
34993#define ELIBEXEC 83
34994#define EILSEQ 84
34995#define ERESTART 85
34996#define ESTRPIPE 86
34997#define EUSERS 87
34998#define ENOTSOCK 88
34999#define EDESTADDRREQ 89
35000#define EMSGSIZE 90
35001#define EPROTOTYPE 91
35002#define ENOPROTOOPT 92
35003#define EPROTONOSUPPORT 93
35004#define ESOCKTNOSUPPORT 94
35005#define EOPNOTSUPP 95
35006#define EPFNOSUPPORT 96
35007#define EAFNOSUPPORT 97
35008#define EADDRINUSE 98
35009#define EADDRNOTAVAIL 99
35010#define ENETDOWN 100
35011#define ENETUNREACH 101
35012#define ENETRESET 102
35013#define ECONNABORTED 103
35014#define ECONNRESET 104
35015#define ENOBUFS 105
35016#define EISCONN 106
35017#define ENOTCONN 107
35018#define ESHUTDOWN 108
35019#define ETOOMANYREFS 109
35020#define ETIMEDOUT 110
35021#define ECONNREFUSED 111
35022#define EHOSTDOWN 112
35023#define EHOSTUNREACH 113
35024#define EALREADY 114
35025#define EINPROGRESS 115
35026#define ESTALE 116
35027#define EUCLEAN 117
35028#define ENOTNAM 118
35029#define ENAVAIL 119
35030#define EISNAM 120
35031#define EREMOTEIO 121
35032#define EDQUOT 122
35033#define ENOMEDIUM 123
35034#define EMEDIUMTYPE 124
35035#define ECANCELED 125
35036#define ENOKEY 126
35037#define EKEYEXPIRED 127
35038#define EKEYREVOKED 128
35039#define EKEYREJECTED 129
35040#define EOWNERDEAD 130
35041#define ENOTRECOVERABLE 131
35042#define ERFKILL 132
35043#define EHWPOISON 133
35044#define ENOTSUP EOPNOTSUPP
35045#define errno (*__errno_location ())
35046#define __error_t_defined 1
35047#define _SYS_PARAM_H 1
35048#define __need_NULL
35049#undef NULL
35050#define NULL ((void*)0)
35051#undef __need_NULL
35052#define __undef_ARG_MAX
35053#define _LINUX_PARAM_H
35054#define __ASM_GENERIC_PARAM_H
35055#define HZ 100
35056#define EXEC_PAGESIZE 4096
35057#define NOGROUP (-1)
35058#define MAXHOSTNAMELEN 64
35059#undef ARG_MAX
35060#undef __undef_ARG_MAX
35061#define MAXSYMLINKS 20
35062#define NOFILE 256
35063#define NCARGS 131072
35064#define NBBY CHAR_BIT
35065#define NGROUPS NGROUPS_MAX
35066#define CANBSIZ MAX_CANON
35067#define MAXPATHLEN PATH_MAX
35068#define NODEV ((dev_t) -1)
35069#define DEV_BSIZE 512
35070#define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
35071#define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
35072#define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
35073#define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
35074#define howmany(x,y) (((x) + ((y) - 1)) / (y))
35075#define roundup(x,y) (__builtin_constant_p (y) && powerof2 (y) ? (((x) + (y) - 1) & ~((y) - 1)) : ((((x) + ((y) - 1)) / (y)) * (y)))
35076#define powerof2(x) ((((x) - 1) & (x)) == 0)
35077#define MIN(a,b) (((a)<(b))?(a):(b))
35078#define MAX(a,b) (((a)>(b))?(a):(b))
35079#define SAVE_ROOT_JMPBUF_BEFORE_STMT
35080#define SAVE_ROOT_JMPBUF_AFTER_STMT
35081#define SAVE_ROOT_JMPBUF(th,stmt) do if (ruby_setjmp((th)->root_jmpbuf) == 0) { SAVE_ROOT_JMPBUF_BEFORE_STMT stmt; SAVE_ROOT_JMPBUF_AFTER_STMT } else { rb_fiber_start(); } while (0)
35082#define EC_PUSH_TAG(ec) do { rb_execution_context_t * const _ec = (ec); struct rb_vm_tag _tag; _tag.state = TAG_NONE; _tag.tag = Qundef; _tag.prev = _ec->tag;
35083#define EC_POP_TAG() _ec->tag = _tag.prev; } while (0)
35084#define EC_TMPPOP_TAG() _ec->tag = _tag.prev
35085#define EC_REPUSH_TAG() (void)(_ec->tag = &_tag)
35086#define VAR_FROM_MEMORY(var) __extension__(*(__typeof__(var) volatile *)&(var))
35087#define VAR_INITIALIZED(var) ((var) = VAR_FROM_MEMORY(var))
35088#define VAR_NOCLOBBERED(var) volatile var
35089#define EC_EXEC_TAG() (ruby_setjmp(_tag.buf) ? rb_ec_tag_state(VAR_FROM_MEMORY(_ec)) : (EC_REPUSH_TAG(), 0))
35090#define EC_JUMP_TAG(ec,st) rb_ec_tag_jump(ec, st)
35091#define INTERNAL_EXCEPTION_P(exc) FIXNUM_P(exc)
35092#define CREF_FL_PUSHED_BY_EVAL IMEMO_FL_USER1
35093#define CREF_FL_OMOD_SHARED IMEMO_FL_USER2
35094#pragma clang diagnostic push
35095#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35096#pragma clang diagnostic pop
35097#define rb_ec_raised_set(ec,f) ((ec)->raised_flag |= (f))
35098#define rb_ec_raised_reset(ec,f) ((ec)->raised_flag &= ~(f))
35099#define rb_ec_raised_p(ec,f) (((ec)->raised_flag & (f)) != 0)
35100#define rb_ec_raised_clear(ec) ((ec)->raised_flag = 0)
35101#define CharNext(p) ((p) + mblen((p), RUBY_MBCHAR_MAXSIZE))
35102#define RUBY_GC_H 1
35103#define SET_MACHINE_STACK_END(p) __asm__ __volatile__ ("movq\t%%rsp, %0" : "=r" (*(p)))
35104#define RUBY_MARK_FREE_DEBUG 0
35105#define RUBY_MARK_ENTER(msg)
35106#define RUBY_MARK_LEAVE(msg)
35107#define RUBY_FREE_ENTER(msg)
35108#define RUBY_FREE_LEAVE(msg)
35109#define RUBY_GC_INFO if(0)printf
35110#define RUBY_MARK_MOVABLE_UNLESS_NULL(ptr) do { VALUE markobj = (ptr); if (RTEST(markobj)) {rb_gc_mark_movable(markobj);} } while (0)
35111#define RUBY_MARK_UNLESS_NULL(ptr) do { VALUE markobj = (ptr); if (RTEST(markobj)) {rb_gc_mark(markobj);} } while (0)
35112#define RUBY_FREE_UNLESS_NULL(ptr) if(ptr){ruby_xfree(ptr);(ptr)=NULL;}
35113#define STACK_UPPER(x,a,b) (b)
35114#define STACK_GROW_DIR_DETECTION
35115#define STACK_DIR_UPPER(a,b) STACK_UPPER(0, (a), (b))
35116#define IS_STACK_DIR_UPPER() STACK_DIR_UPPER(1,0)
35117#pragma GCC visibility push(default)
35118#pragma GCC visibility pop
35119#define INTERNAL_COMPILE_H
35120#pragma GCC visibility push(default)
35121#pragma GCC visibility pop
35122#define INTERNAL_CONT_H
35123#define INTERNAL_ERROR_H
35124#define INTERNAL_STRING_H
35125#define RUBY_ENCODING_H 1
35126#define ONIGURUMA_H
35127#define ONIGMO_H
35128#define ONIGMO_VERSION_MAJOR 6
35129#define ONIGMO_VERSION_MINOR 1
35130#define ONIGMO_VERSION_TEENY 3
35131#define ONIG_EXTERN RUBY_EXTERN
35132#pragma GCC visibility push(default)
35133#define UChar OnigUChar
35134#define ONIG_INFINITE_DISTANCE ~((OnigDistance )0)
35135#define OnigCodePointMaskWidth 3
35136#define OnigCodePointMask ((1<<OnigCodePointMaskWidth)-1)
35137#define OnigCodePointCount(n) ((n)&OnigCodePointMask)
35138#define OnigCaseFoldFlags(n) ((n)&~OnigCodePointMask)
35139#define OnigSpecialIndexShift 3
35140#define OnigSpecialIndexWidth 10
35141#define ONIGENC_CASE_UPCASE (1<<13)
35142#define ONIGENC_CASE_DOWNCASE (1<<14)
35143#define ONIGENC_CASE_TITLECASE (1<<15)
35144#define ONIGENC_CASE_SPECIAL_OFFSET 3
35145#define ONIGENC_CASE_UP_SPECIAL (1<<16)
35146#define ONIGENC_CASE_DOWN_SPECIAL (1<<17)
35147#define ONIGENC_CASE_MODIFIED (1<<18)
35148#define ONIGENC_CASE_FOLD (1<<19)
35149#define ONIGENC_CASE_FOLD_TURKISH_AZERI (1<<20)
35150#define ONIGENC_CASE_FOLD_LITHUANIAN (1<<21)
35151#define ONIGENC_CASE_ASCII_ONLY (1<<22)
35152#define ONIGENC_CASE_IS_TITLECASE (1<<23)
35153#define INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR (1<<30)
35154#define ONIGENC_CASE_FOLD_MIN INTERNAL_ONIGENC_CASE_FOLD_MULTI_CHAR
35155#define ONIGENC_CASE_FOLD_DEFAULT OnigDefaultCaseFoldFlag
35156#define ONIGENC_MAX_COMP_CASE_FOLD_CODE_LEN 3
35157#define ONIGENC_GET_CASE_FOLD_CODES_MAX_NUM 13
35158#define ONIGENC_CODE_RANGE_NUM(range) ((int )range[0])
35159#define ONIGENC_CODE_RANGE_FROM(range,i) range[((i)*2) + 1]
35160#define ONIGENC_CODE_RANGE_TO(range,i) range[((i)*2) + 2]
35161#define ONIG_ENCODING_ASCII (&OnigEncodingASCII)
35162#define ONIG_ENCODING_UNDEF ((OnigEncoding )0)
35163#define ONIGENC_CODE_TO_MBC_MAXLEN 7
35164#define ONIGENC_MBC_CASE_FOLD_MAXLEN 18
35165#define ONIGENC_CTYPE_NEWLINE 0
35166#define ONIGENC_CTYPE_ALPHA 1
35167#define ONIGENC_CTYPE_BLANK 2
35168#define ONIGENC_CTYPE_CNTRL 3
35169#define ONIGENC_CTYPE_DIGIT 4
35170#define ONIGENC_CTYPE_GRAPH 5
35171#define ONIGENC_CTYPE_LOWER 6
35172#define ONIGENC_CTYPE_PRINT 7
35173#define ONIGENC_CTYPE_PUNCT 8
35174#define ONIGENC_CTYPE_SPACE 9
35175#define ONIGENC_CTYPE_UPPER 10
35176#define ONIGENC_CTYPE_XDIGIT 11
35177#define ONIGENC_CTYPE_WORD 12
35178#define ONIGENC_CTYPE_ALNUM 13
35179#define ONIGENC_CTYPE_ASCII 14
35180#define ONIGENC_MAX_STD_CTYPE ONIGENC_CTYPE_ASCII
35181#define ONIGENC_FLAG_NONE 0U
35182#define ONIGENC_FLAG_UNICODE 1U
35183#define onig_enc_len(enc,p,e) ONIGENC_MBC_ENC_LEN(enc, p, e)
35184#define ONIGENC_IS_UNDEF(enc) ((enc) == ONIG_ENCODING_UNDEF)
35185#define ONIGENC_IS_SINGLEBYTE(enc) (ONIGENC_MBC_MAXLEN(enc) == 1)
35186#define ONIGENC_IS_MBC_HEAD(enc,p,e) (ONIGENC_MBC_ENC_LEN(enc,p,e) != 1)
35187#define ONIGENC_IS_MBC_ASCII(p) (*(p) < 128)
35188#define ONIGENC_IS_CODE_ASCII(code) ((code) < 128)
35189#define ONIGENC_IS_MBC_WORD(enc,s,end) ONIGENC_IS_CODE_WORD(enc,ONIGENC_MBC_TO_CODE(enc,s,end))
35190#define ONIGENC_IS_MBC_ASCII_WORD(enc,s,end) onigenc_ascii_is_code_ctype( ONIGENC_MBC_TO_CODE(enc,s,end),ONIGENC_CTYPE_WORD,enc)
35191#define ONIGENC_IS_UNICODE(enc) ((enc)->flags & ONIGENC_FLAG_UNICODE)
35192#define ONIGENC_NAME(enc) ((enc)->name)
35193#define ONIGENC_MBC_CASE_FOLD(enc,flag,pp,end,buf) (enc)->mbc_case_fold(flag,(const OnigUChar** )pp,end,buf,enc)
35194#define ONIGENC_IS_ALLOWED_REVERSE_MATCH(enc,s,end) (enc)->is_allowed_reverse_match(s,end,enc)
35195#define ONIGENC_LEFT_ADJUST_CHAR_HEAD(enc,start,s,end) (enc)->left_adjust_char_head(start, s, end, enc)
35196#define ONIGENC_APPLY_ALL_CASE_FOLD(enc,case_fold_flag,f,arg) (enc)->apply_all_case_fold(case_fold_flag,f,arg,enc)
35197#define ONIGENC_GET_CASE_FOLD_CODES_BY_STR(enc,case_fold_flag,p,end,acs) (enc)->get_case_fold_codes_by_str(case_fold_flag,p,end,acs,enc)
35198#define ONIGENC_STEP_BACK(enc,start,s,end,n) onigenc_step_back((enc),(start),(s),(end),(n))
35199#define ONIGENC_CONSTRUCT_MBCLEN_CHARFOUND(n) (n)
35200#define ONIGENC_MBCLEN_CHARFOUND_P(r) (0 < (r))
35201#define ONIGENC_MBCLEN_CHARFOUND_LEN(r) (r)
35202#define ONIGENC_CONSTRUCT_MBCLEN_INVALID() (-1)
35203#define ONIGENC_MBCLEN_INVALID_P(r) ((r) == -1)
35204#define ONIGENC_CONSTRUCT_MBCLEN_NEEDMORE(n) (-1-(n))
35205#define ONIGENC_MBCLEN_NEEDMORE_P(r) ((r) < -1)
35206#define ONIGENC_MBCLEN_NEEDMORE_LEN(r) (-1-(r))
35207#define ONIGENC_PRECISE_MBC_ENC_LEN(enc,p,e) (enc)->precise_mbc_enc_len(p,e,enc)
35208#define ONIGENC_MBC_ENC_LEN(enc,p,e) onigenc_mbclen_approximate(p,e,enc)
35209#define ONIGENC_MBC_MAXLEN(enc) ((enc)->max_enc_len)
35210#define ONIGENC_MBC_MAXLEN_DIST(enc) ONIGENC_MBC_MAXLEN(enc)
35211#define ONIGENC_MBC_MINLEN(enc) ((enc)->min_enc_len)
35212#define ONIGENC_IS_MBC_NEWLINE(enc,p,end) (enc)->is_mbc_newline((p),(end),enc)
35213#define ONIGENC_MBC_TO_CODE(enc,p,end) (enc)->mbc_to_code((p),(end),enc)
35214#define ONIGENC_CODE_TO_MBCLEN(enc,code) (enc)->code_to_mbclen(code,enc)
35215#define ONIGENC_CODE_TO_MBC(enc,code,buf) (enc)->code_to_mbc(code,buf,enc)
35216#define ONIGENC_PROPERTY_NAME_TO_CTYPE(enc,p,end) (enc)->property_name_to_ctype(enc,p,end)
35217#define ONIGENC_IS_CODE_CTYPE(enc,code,ctype) (enc)->is_code_ctype(code,ctype,enc)
35218#define ONIGENC_IS_CODE_NEWLINE(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_NEWLINE)
35219#define ONIGENC_IS_CODE_GRAPH(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_GRAPH)
35220#define ONIGENC_IS_CODE_PRINT(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PRINT)
35221#define ONIGENC_IS_CODE_ALNUM(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALNUM)
35222#define ONIGENC_IS_CODE_ALPHA(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_ALPHA)
35223#define ONIGENC_IS_CODE_LOWER(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_LOWER)
35224#define ONIGENC_IS_CODE_UPPER(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_UPPER)
35225#define ONIGENC_IS_CODE_CNTRL(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_CNTRL)
35226#define ONIGENC_IS_CODE_PUNCT(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_PUNCT)
35227#define ONIGENC_IS_CODE_SPACE(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_SPACE)
35228#define ONIGENC_IS_CODE_BLANK(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_BLANK)
35229#define ONIGENC_IS_CODE_DIGIT(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_DIGIT)
35230#define ONIGENC_IS_CODE_XDIGIT(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_XDIGIT)
35231#define ONIGENC_IS_CODE_WORD(enc,code) ONIGENC_IS_CODE_CTYPE(enc,code,ONIGENC_CTYPE_WORD)
35232#define ONIGENC_GET_CTYPE_CODE_RANGE(enc,ctype,sbout,ranges) (enc)->get_ctype_code_range(ctype,sbout,ranges,enc)
35233#define ONIG_NREGION 4
35234#define ONIG_MAX_CAPTURE_GROUP_NUM 32767
35235#define ONIG_MAX_BACKREF_NUM 1000
35236#define ONIG_MAX_REPEAT_NUM 100000
35237#define ONIG_MAX_MULTI_BYTE_RANGES_NUM 10000
35238#define ONIG_MAX_ERROR_MESSAGE_LEN 90
35239#define ONIG_OPTION_DEFAULT ONIG_OPTION_NONE
35240#define ONIG_OPTION_NONE 0U
35241#define ONIG_OPTION_IGNORECASE 1U
35242#define ONIG_OPTION_EXTEND (ONIG_OPTION_IGNORECASE << 1)
35243#define ONIG_OPTION_MULTILINE (ONIG_OPTION_EXTEND << 1)
35244#define ONIG_OPTION_DOTALL ONIG_OPTION_MULTILINE
35245#define ONIG_OPTION_SINGLELINE (ONIG_OPTION_MULTILINE << 1)
35246#define ONIG_OPTION_FIND_LONGEST (ONIG_OPTION_SINGLELINE << 1)
35247#define ONIG_OPTION_FIND_NOT_EMPTY (ONIG_OPTION_FIND_LONGEST << 1)
35248#define ONIG_OPTION_NEGATE_SINGLELINE (ONIG_OPTION_FIND_NOT_EMPTY << 1)
35249#define ONIG_OPTION_DONT_CAPTURE_GROUP (ONIG_OPTION_NEGATE_SINGLELINE << 1)
35250#define ONIG_OPTION_CAPTURE_GROUP (ONIG_OPTION_DONT_CAPTURE_GROUP << 1)
35251#define ONIG_OPTION_NOTBOL (ONIG_OPTION_CAPTURE_GROUP << 1)
35252#define ONIG_OPTION_NOTEOL (ONIG_OPTION_NOTBOL << 1)
35253#define ONIG_OPTION_NOTBOS (ONIG_OPTION_NOTEOL << 1)
35254#define ONIG_OPTION_NOTEOS (ONIG_OPTION_NOTBOS << 1)
35255#define ONIG_OPTION_ASCII_RANGE (ONIG_OPTION_NOTEOS << 1)
35256#define ONIG_OPTION_POSIX_BRACKET_ALL_RANGE (ONIG_OPTION_ASCII_RANGE << 1)
35257#define ONIG_OPTION_WORD_BOUND_ALL_RANGE (ONIG_OPTION_POSIX_BRACKET_ALL_RANGE << 1)
35258#define ONIG_OPTION_NEWLINE_CRLF (ONIG_OPTION_WORD_BOUND_ALL_RANGE << 1)
35259#define ONIG_OPTION_MAXBIT ONIG_OPTION_NEWLINE_CRLF
35260#define ONIG_OPTION_ON(options,regopt) ((options) |= (regopt))
35261#define ONIG_OPTION_OFF(options,regopt) ((options) &= ~(regopt))
35262#define ONIG_IS_OPTION_ON(options,option) ((options) & (option))
35263#define ONIG_SYNTAX_ASIS (&OnigSyntaxASIS)
35264#define ONIG_SYNTAX_POSIX_BASIC (&OnigSyntaxPosixBasic)
35265#define ONIG_SYNTAX_POSIX_EXTENDED (&OnigSyntaxPosixExtended)
35266#define ONIG_SYNTAX_EMACS (&OnigSyntaxEmacs)
35267#define ONIG_SYNTAX_GREP (&OnigSyntaxGrep)
35268#define ONIG_SYNTAX_GNU_REGEX (&OnigSyntaxGnuRegex)
35269#define ONIG_SYNTAX_JAVA (&OnigSyntaxJava)
35270#define ONIG_SYNTAX_PERL58 (&OnigSyntaxPerl58)
35271#define ONIG_SYNTAX_PERL58_NG (&OnigSyntaxPerl58_NG)
35272#define ONIG_SYNTAX_PERL (&OnigSyntaxPerl)
35273#define ONIG_SYNTAX_RUBY (&OnigSyntaxRuby)
35274#define ONIG_SYNTAX_PYTHON (&OnigSyntaxPython)
35275#define ONIG_SYNTAX_DEFAULT OnigDefaultSyntax
35276#define ONIG_SYN_OP_VARIABLE_META_CHARACTERS (1U<<0)
35277#define ONIG_SYN_OP_DOT_ANYCHAR (1U<<1)
35278#define ONIG_SYN_OP_ASTERISK_ZERO_INF (1U<<2)
35279#define ONIG_SYN_OP_ESC_ASTERISK_ZERO_INF (1U<<3)
35280#define ONIG_SYN_OP_PLUS_ONE_INF (1U<<4)
35281#define ONIG_SYN_OP_ESC_PLUS_ONE_INF (1U<<5)
35282#define ONIG_SYN_OP_QMARK_ZERO_ONE (1U<<6)
35283#define ONIG_SYN_OP_ESC_QMARK_ZERO_ONE (1U<<7)
35284#define ONIG_SYN_OP_BRACE_INTERVAL (1U<<8)
35285#define ONIG_SYN_OP_ESC_BRACE_INTERVAL (1U<<9)
35286#define ONIG_SYN_OP_VBAR_ALT (1U<<10)
35287#define ONIG_SYN_OP_ESC_VBAR_ALT (1U<<11)
35288#define ONIG_SYN_OP_LPAREN_SUBEXP (1U<<12)
35289#define ONIG_SYN_OP_ESC_LPAREN_SUBEXP (1U<<13)
35290#define ONIG_SYN_OP_ESC_AZ_BUF_ANCHOR (1U<<14)
35291#define ONIG_SYN_OP_ESC_CAPITAL_G_BEGIN_ANCHOR (1U<<15)
35292#define ONIG_SYN_OP_DECIMAL_BACKREF (1U<<16)
35293#define ONIG_SYN_OP_BRACKET_CC (1U<<17)
35294#define ONIG_SYN_OP_ESC_W_WORD (1U<<18)
35295#define ONIG_SYN_OP_ESC_LTGT_WORD_BEGIN_END (1U<<19)
35296#define ONIG_SYN_OP_ESC_B_WORD_BOUND (1U<<20)
35297#define ONIG_SYN_OP_ESC_S_WHITE_SPACE (1U<<21)
35298#define ONIG_SYN_OP_ESC_D_DIGIT (1U<<22)
35299#define ONIG_SYN_OP_LINE_ANCHOR (1U<<23)
35300#define ONIG_SYN_OP_POSIX_BRACKET (1U<<24)
35301#define ONIG_SYN_OP_QMARK_NON_GREEDY (1U<<25)
35302#define ONIG_SYN_OP_ESC_CONTROL_CHARS (1U<<26)
35303#define ONIG_SYN_OP_ESC_C_CONTROL (1U<<27)
35304#define ONIG_SYN_OP_ESC_OCTAL3 (1U<<28)
35305#define ONIG_SYN_OP_ESC_X_HEX2 (1U<<29)
35306#define ONIG_SYN_OP_ESC_X_BRACE_HEX8 (1U<<30)
35307#define ONIG_SYN_OP_ESC_O_BRACE_OCTAL (1U<<31)
35308#define ONIG_SYN_OP2_ESC_CAPITAL_Q_QUOTE (1U<<0)
35309#define ONIG_SYN_OP2_QMARK_GROUP_EFFECT (1U<<1)
35310#define ONIG_SYN_OP2_OPTION_PERL (1U<<2)
35311#define ONIG_SYN_OP2_OPTION_RUBY (1U<<3)
35312#define ONIG_SYN_OP2_PLUS_POSSESSIVE_REPEAT (1U<<4)
35313#define ONIG_SYN_OP2_PLUS_POSSESSIVE_INTERVAL (1U<<5)
35314#define ONIG_SYN_OP2_CCLASS_SET_OP (1U<<6)
35315#define ONIG_SYN_OP2_QMARK_LT_NAMED_GROUP (1U<<7)
35316#define ONIG_SYN_OP2_ESC_K_NAMED_BACKREF (1U<<8)
35317#define ONIG_SYN_OP2_ESC_G_SUBEXP_CALL (1U<<9)
35318#define ONIG_SYN_OP2_ATMARK_CAPTURE_HISTORY (1U<<10)
35319#define ONIG_SYN_OP2_ESC_CAPITAL_C_BAR_CONTROL (1U<<11)
35320#define ONIG_SYN_OP2_ESC_CAPITAL_M_BAR_META (1U<<12)
35321#define ONIG_SYN_OP2_ESC_V_VTAB (1U<<13)
35322#define ONIG_SYN_OP2_ESC_U_HEX4 (1U<<14)
35323#define ONIG_SYN_OP2_ESC_GNU_BUF_ANCHOR (1U<<15)
35324#define ONIG_SYN_OP2_ESC_P_BRACE_CHAR_PROPERTY (1U<<16)
35325#define ONIG_SYN_OP2_ESC_P_BRACE_CIRCUMFLEX_NOT (1U<<17)
35326#define ONIG_SYN_OP2_ESC_H_XDIGIT (1U<<19)
35327#define ONIG_SYN_OP2_INEFFECTIVE_ESCAPE (1U<<20)
35328#define ONIG_SYN_OP2_ESC_CAPITAL_R_LINEBREAK (1U<<21)
35329#define ONIG_SYN_OP2_ESC_CAPITAL_X_EXTENDED_GRAPHEME_CLUSTER (1U<<22)
35330#define ONIG_SYN_OP2_ESC_V_VERTICAL_WHITESPACE (1U<<23)
35331#define ONIG_SYN_OP2_ESC_H_HORIZONTAL_WHITESPACE (1U<<24)
35332#define ONIG_SYN_OP2_ESC_CAPITAL_K_KEEP (1U<<25)
35333#define ONIG_SYN_OP2_ESC_G_BRACE_BACKREF (1U<<26)
35334#define ONIG_SYN_OP2_QMARK_SUBEXP_CALL (1U<<27)
35335#define ONIG_SYN_OP2_QMARK_VBAR_BRANCH_RESET (1U<<28)
35336#define ONIG_SYN_OP2_QMARK_LPAREN_CONDITION (1U<<29)
35337#define ONIG_SYN_OP2_QMARK_CAPITAL_P_NAMED_GROUP (1U<<30)
35338#define ONIG_SYN_OP2_QMARK_TILDE_ABSENT (1U<<31)
35339#define ONIG_SYN_CONTEXT_INDEP_ANCHORS (1U<<31)
35340#define ONIG_SYN_CONTEXT_INDEP_REPEAT_OPS (1U<<0)
35341#define ONIG_SYN_CONTEXT_INVALID_REPEAT_OPS (1U<<1)
35342#define ONIG_SYN_ALLOW_UNMATCHED_CLOSE_SUBEXP (1U<<2)
35343#define ONIG_SYN_ALLOW_INVALID_INTERVAL (1U<<3)
35344#define ONIG_SYN_ALLOW_INTERVAL_LOW_ABBREV (1U<<4)
35345#define ONIG_SYN_STRICT_CHECK_BACKREF (1U<<5)
35346#define ONIG_SYN_DIFFERENT_LEN_ALT_LOOK_BEHIND (1U<<6)
35347#define ONIG_SYN_CAPTURE_ONLY_NAMED_GROUP (1U<<7)
35348#define ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME (1U<<8)
35349#define ONIG_SYN_FIXED_INTERVAL_IS_GREEDY_ONLY (1U<<9)
35350#define ONIG_SYN_ALLOW_MULTIPLEX_DEFINITION_NAME_CALL (1U<<10)
35351#define ONIG_SYN_USE_LEFT_MOST_NAMED_GROUP (1U<<11)
35352#define ONIG_SYN_NOT_NEWLINE_IN_NEGATIVE_CC (1U<<20)
35353#define ONIG_SYN_BACKSLASH_ESCAPE_IN_CC (1U<<21)
35354#define ONIG_SYN_ALLOW_EMPTY_RANGE_IN_CC (1U<<22)
35355#define ONIG_SYN_ALLOW_DOUBLE_RANGE_OP_IN_CC (1U<<23)
35356#define ONIG_SYN_WARN_CC_OP_NOT_ESCAPED (1U<<24)
35357#define ONIG_SYN_WARN_REDUNDANT_NESTED_REPEAT (1U<<25)
35358#define ONIG_SYN_WARN_CC_DUP (1U<<26)
35359#define ONIG_META_CHAR_ESCAPE 0
35360#define ONIG_META_CHAR_ANYCHAR 1
35361#define ONIG_META_CHAR_ANYTIME 2
35362#define ONIG_META_CHAR_ZERO_OR_ONE_TIME 3
35363#define ONIG_META_CHAR_ONE_OR_MORE_TIME 4
35364#define ONIG_META_CHAR_ANYCHAR_ANYTIME 5
35365#define ONIG_INEFFECTIVE_META_CHAR 0
35366#define ONIG_IS_PATTERN_ERROR(ecode) ((ecode) <= -100 && (ecode) > -1000)
35367#define ONIG_NORMAL 0
35368#define ONIG_MISMATCH -1
35369#define ONIG_NO_SUPPORT_CONFIG -2
35370#define ONIGERR_MEMORY -5
35371#define ONIGERR_TYPE_BUG -6
35372#define ONIGERR_PARSER_BUG -11
35373#define ONIGERR_STACK_BUG -12
35374#define ONIGERR_UNDEFINED_BYTECODE -13
35375#define ONIGERR_UNEXPECTED_BYTECODE -14
35376#define ONIGERR_MATCH_STACK_LIMIT_OVER -15
35377#define ONIGERR_PARSE_DEPTH_LIMIT_OVER -16
35378#define ONIGERR_DEFAULT_ENCODING_IS_NOT_SET -21
35379#define ONIGERR_SPECIFIED_ENCODING_CANT_CONVERT_TO_WIDE_CHAR -22
35380#define ONIGERR_INVALID_ARGUMENT -30
35381#define ONIGERR_END_PATTERN_AT_LEFT_BRACE -100
35382#define ONIGERR_END_PATTERN_AT_LEFT_BRACKET -101
35383#define ONIGERR_EMPTY_CHAR_CLASS -102
35384#define ONIGERR_PREMATURE_END_OF_CHAR_CLASS -103
35385#define ONIGERR_END_PATTERN_AT_ESCAPE -104
35386#define ONIGERR_END_PATTERN_AT_META -105
35387#define ONIGERR_END_PATTERN_AT_CONTROL -106
35388#define ONIGERR_META_CODE_SYNTAX -108
35389#define ONIGERR_CONTROL_CODE_SYNTAX -109
35390#define ONIGERR_CHAR_CLASS_VALUE_AT_END_OF_RANGE -110
35391#define ONIGERR_CHAR_CLASS_VALUE_AT_START_OF_RANGE -111
35392#define ONIGERR_UNMATCHED_RANGE_SPECIFIER_IN_CHAR_CLASS -112
35393#define ONIGERR_TARGET_OF_REPEAT_OPERATOR_NOT_SPECIFIED -113
35394#define ONIGERR_TARGET_OF_REPEAT_OPERATOR_INVALID -114
35395#define ONIGERR_NESTED_REPEAT_OPERATOR -115
35396#define ONIGERR_UNMATCHED_CLOSE_PARENTHESIS -116
35397#define ONIGERR_END_PATTERN_WITH_UNMATCHED_PARENTHESIS -117
35398#define ONIGERR_END_PATTERN_IN_GROUP -118
35399#define ONIGERR_UNDEFINED_GROUP_OPTION -119
35400#define ONIGERR_INVALID_POSIX_BRACKET_TYPE -121
35401#define ONIGERR_INVALID_LOOK_BEHIND_PATTERN -122
35402#define ONIGERR_INVALID_REPEAT_RANGE_PATTERN -123
35403#define ONIGERR_INVALID_CONDITION_PATTERN -124
35404#define ONIGERR_TOO_BIG_NUMBER -200
35405#define ONIGERR_TOO_BIG_NUMBER_FOR_REPEAT_RANGE -201
35406#define ONIGERR_UPPER_SMALLER_THAN_LOWER_IN_REPEAT_RANGE -202
35407#define ONIGERR_EMPTY_RANGE_IN_CHAR_CLASS -203
35408#define ONIGERR_MISMATCH_CODE_LENGTH_IN_CLASS_RANGE -204
35409#define ONIGERR_TOO_MANY_MULTI_BYTE_RANGES -205
35410#define ONIGERR_TOO_SHORT_MULTI_BYTE_STRING -206
35411#define ONIGERR_TOO_BIG_BACKREF_NUMBER -207
35412#define ONIGERR_INVALID_BACKREF -208
35413#define ONIGERR_NUMBERED_BACKREF_OR_CALL_NOT_ALLOWED -209
35414#define ONIGERR_TOO_MANY_CAPTURE_GROUPS -210
35415#define ONIGERR_TOO_SHORT_DIGITS -211
35416#define ONIGERR_TOO_LONG_WIDE_CHAR_VALUE -212
35417#define ONIGERR_EMPTY_GROUP_NAME -214
35418#define ONIGERR_INVALID_GROUP_NAME -215
35419#define ONIGERR_INVALID_CHAR_IN_GROUP_NAME -216
35420#define ONIGERR_UNDEFINED_NAME_REFERENCE -217
35421#define ONIGERR_UNDEFINED_GROUP_REFERENCE -218
35422#define ONIGERR_MULTIPLEX_DEFINED_NAME -219
35423#define ONIGERR_MULTIPLEX_DEFINITION_NAME_CALL -220
35424#define ONIGERR_NEVER_ENDING_RECURSION -221
35425#define ONIGERR_GROUP_NUMBER_OVER_FOR_CAPTURE_HISTORY -222
35426#define ONIGERR_INVALID_CHAR_PROPERTY_NAME -223
35427#define ONIGERR_INVALID_CODE_POINT_VALUE -400
35428#define ONIGERR_INVALID_WIDE_CHAR_VALUE -400
35429#define ONIGERR_TOO_BIG_WIDE_CHAR_VALUE -401
35430#define ONIGERR_NOT_SUPPORTED_ENCODING_COMBINATION -402
35431#define ONIGERR_INVALID_COMBINATION_OF_OPTIONS -403
35432#define ONIG_MAX_CAPTURE_HISTORY_GROUP 31
35433#define ONIG_IS_CAPTURE_HISTORY_GROUP(r,i) ((i) <= ONIG_MAX_CAPTURE_HISTORY_GROUP && (r)->list && (r)->list[i])
35434#define ONIG_TRAVERSE_CALLBACK_AT_FIRST 1
35435#define ONIG_TRAVERSE_CALLBACK_AT_LAST 2
35436#define ONIG_TRAVERSE_CALLBACK_AT_BOTH ( ONIG_TRAVERSE_CALLBACK_AT_FIRST | ONIG_TRAVERSE_CALLBACK_AT_LAST )
35437#define ONIG_REGION_NOTPOS -1
35438#define ONIG_NULL_WARN onig_null_warn
35439#define ONIG_CHAR_TABLE_SIZE 256
35440#pragma GCC visibility pop
35441#define ONIGURUMA
35442#define ONIGURUMA_VERSION_MAJOR ONIGMO_VERSION_MAJOR
35443#define ONIGURUMA_VERSION_MINOR ONIGMO_VERSION_MINOR
35444#define ONIGURUMA_VERSION_TEENY ONIGMO_VERSION_TEENY
35445#pragma GCC visibility push(default)
35446#define ENCODING_INLINE_MAX RUBY_ENCODING_INLINE_MAX
35447#define ENCODING_SHIFT RUBY_ENCODING_SHIFT
35448#define ENCODING_MASK RUBY_ENCODING_MASK
35449#define RB_ENCODING_SET_INLINED(obj,i) do { RBASIC(obj)->flags &= ~RUBY_ENCODING_MASK; RBASIC(obj)->flags |= (VALUE)(i) << RUBY_ENCODING_SHIFT;} while (0)
35450#define RB_ENCODING_SET(obj,i) rb_enc_set_index((obj), (i))
35451#define RB_ENCODING_GET_INLINED(obj) (int)((RBASIC(obj)->flags & RUBY_ENCODING_MASK)>>RUBY_ENCODING_SHIFT)
35452#define RB_ENCODING_GET(obj) (RB_ENCODING_GET_INLINED(obj) != RUBY_ENCODING_INLINE_MAX ? RB_ENCODING_GET_INLINED(obj) : rb_enc_get_index(obj))
35453#define RB_ENCODING_IS_ASCII8BIT(obj) (RB_ENCODING_GET_INLINED(obj) == 0)
35454#define ENCODING_SET_INLINED(obj,i) RB_ENCODING_SET_INLINED(obj,i)
35455#define ENCODING_SET(obj,i) RB_ENCODING_SET(obj,i)
35456#define ENCODING_GET_INLINED(obj) RB_ENCODING_GET_INLINED(obj)
35457#define ENCODING_GET(obj) RB_ENCODING_GET(obj)
35458#define ENCODING_IS_ASCII8BIT(obj) RB_ENCODING_IS_ASCII8BIT(obj)
35459#define ENCODING_MAXNAMELEN RUBY_ENCODING_MAXNAMELEN
35460#define RB_ENC_CODERANGE_CLEAN_P(cr) rb_enc_coderange_clean_p(cr)
35461#define RB_ENC_CODERANGE(obj) ((int)RBASIC(obj)->flags & RUBY_ENC_CODERANGE_MASK)
35462#define RB_ENC_CODERANGE_ASCIIONLY(obj) (RB_ENC_CODERANGE(obj) == RUBY_ENC_CODERANGE_7BIT)
35463#define RB_ENC_CODERANGE_SET(obj,cr) ( RBASIC(obj)->flags = (RBASIC(obj)->flags & ~RUBY_ENC_CODERANGE_MASK) | (cr))
35464#define RB_ENC_CODERANGE_CLEAR(obj) RB_ENC_CODERANGE_SET((obj),0)
35465#define RB_ENC_CODERANGE_AND(a,b) ((a) == RUBY_ENC_CODERANGE_7BIT ? (b) : (a) != RUBY_ENC_CODERANGE_VALID ? RUBY_ENC_CODERANGE_UNKNOWN : (b) == RUBY_ENC_CODERANGE_7BIT ? RUBY_ENC_CODERANGE_VALID : (b))
35466#define RB_ENCODING_CODERANGE_SET(obj,encindex,cr) do { VALUE rb_encoding_coderange_obj = (obj); RB_ENCODING_SET(rb_encoding_coderange_obj, (encindex)); RB_ENC_CODERANGE_SET(rb_encoding_coderange_obj, (cr)); } while (0)
35467#define ENC_CODERANGE_MASK RUBY_ENC_CODERANGE_MASK
35468#define ENC_CODERANGE_UNKNOWN RUBY_ENC_CODERANGE_UNKNOWN
35469#define ENC_CODERANGE_7BIT RUBY_ENC_CODERANGE_7BIT
35470#define ENC_CODERANGE_VALID RUBY_ENC_CODERANGE_VALID
35471#define ENC_CODERANGE_BROKEN RUBY_ENC_CODERANGE_BROKEN
35472#define ENC_CODERANGE_CLEAN_P(cr) RB_ENC_CODERANGE_CLEAN_P(cr)
35473#define ENC_CODERANGE(obj) RB_ENC_CODERANGE(obj)
35474#define ENC_CODERANGE_ASCIIONLY(obj) RB_ENC_CODERANGE_ASCIIONLY(obj)
35475#define ENC_CODERANGE_SET(obj,cr) RB_ENC_CODERANGE_SET(obj,cr)
35476#define ENC_CODERANGE_CLEAR(obj) RB_ENC_CODERANGE_CLEAR(obj)
35477#define ENC_CODERANGE_AND(a,b) RB_ENC_CODERANGE_AND(a, b)
35478#define ENCODING_CODERANGE_SET(obj,encindex,cr) RB_ENCODING_CODERANGE_SET(obj, encindex, cr)
35479#define rb_enc_str_new(str,len,enc) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str) && __builtin_constant_p(len)) ? rb_enc_str_new_static((str), (len), (enc)) : rb_enc_str_new((str), (len), (enc)) )
35480#define rb_enc_str_new_cstr(str,enc) RB_GNUC_EXTENSION_BLOCK( (__builtin_constant_p(str)) ? rb_enc_str_new_static((str), (long)strlen(str), (enc)) : rb_enc_str_new_cstr((str), (enc)) )
35481#define rb_enc_name(enc) (enc)->name
35482#define rb_enc_mbminlen(enc) (enc)->min_enc_len
35483#define rb_enc_mbmaxlen(enc) (enc)->max_enc_len
35484#define MBCLEN_CHARFOUND_P(ret) ONIGENC_MBCLEN_CHARFOUND_P(ret)
35485#define MBCLEN_CHARFOUND_LEN(ret) ONIGENC_MBCLEN_CHARFOUND_LEN(ret)
35486#define MBCLEN_INVALID_P(ret) ONIGENC_MBCLEN_INVALID_P(ret)
35487#define MBCLEN_NEEDMORE_P(ret) ONIGENC_MBCLEN_NEEDMORE_P(ret)
35488#define MBCLEN_NEEDMORE_LEN(ret) ONIGENC_MBCLEN_NEEDMORE_LEN(ret)
35489#define rb_enc_codepoint(p,e,enc) rb_enc_codepoint_len((p),(e),0,(enc))
35490#define rb_enc_mbc_to_codepoint(p,e,enc) ONIGENC_MBC_TO_CODE((enc),(UChar*)(p),(UChar*)(e))
35491#define rb_enc_code_to_mbclen(c,enc) ONIGENC_CODE_TO_MBCLEN((enc), (c));
35492#define rb_enc_mbcput(c,buf,enc) ONIGENC_CODE_TO_MBC((enc),(c),(UChar*)(buf))
35493#define rb_enc_prev_char(s,p,e,enc) ((char *)onigenc_get_prev_char_head((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e)))
35494#define rb_enc_left_char_head(s,p,e,enc) ((char *)onigenc_get_left_adjust_char_head((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e)))
35495#define rb_enc_right_char_head(s,p,e,enc) ((char *)onigenc_get_right_adjust_char_head((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e)))
35496#define rb_enc_step_back(s,p,e,n,enc) ((char *)onigenc_step_back((enc),(UChar*)(s),(UChar*)(p),(UChar*)(e),(int)(n)))
35497#define rb_enc_is_newline(p,end,enc) ONIGENC_IS_MBC_NEWLINE((enc),(UChar*)(p),(UChar*)(end))
35498#define rb_enc_isctype(c,t,enc) ONIGENC_IS_CODE_CTYPE((enc),(c),(t))
35499#define rb_enc_isascii(c,enc) ONIGENC_IS_CODE_ASCII(c)
35500#define rb_enc_isalpha(c,enc) ONIGENC_IS_CODE_ALPHA((enc),(c))
35501#define rb_enc_islower(c,enc) ONIGENC_IS_CODE_LOWER((enc),(c))
35502#define rb_enc_isupper(c,enc) ONIGENC_IS_CODE_UPPER((enc),(c))
35503#define rb_enc_ispunct(c,enc) ONIGENC_IS_CODE_PUNCT((enc),(c))
35504#define rb_enc_isalnum(c,enc) ONIGENC_IS_CODE_ALNUM((enc),(c))
35505#define rb_enc_isprint(c,enc) ONIGENC_IS_CODE_PRINT((enc),(c))
35506#define rb_enc_isspace(c,enc) ONIGENC_IS_CODE_SPACE((enc),(c))
35507#define rb_enc_isdigit(c,enc) ONIGENC_IS_CODE_DIGIT((enc),(c))
35508#define rb_enc_asciicompat(enc) rb_enc_asciicompat_inline(enc)
35509#define rb_enc_str_asciicompat_p(str) rb_enc_asciicompat(rb_enc_get(str))
35510#define ECONV_ERROR_HANDLER_MASK RUBY_ECONV_ERROR_HANDLER_MASK
35511#define ECONV_INVALID_MASK RUBY_ECONV_INVALID_MASK
35512#define ECONV_INVALID_REPLACE RUBY_ECONV_INVALID_REPLACE
35513#define ECONV_UNDEF_MASK RUBY_ECONV_UNDEF_MASK
35514#define ECONV_UNDEF_REPLACE RUBY_ECONV_UNDEF_REPLACE
35515#define ECONV_UNDEF_HEX_CHARREF RUBY_ECONV_UNDEF_HEX_CHARREF
35516#define ECONV_DECORATOR_MASK RUBY_ECONV_DECORATOR_MASK
35517#define ECONV_NEWLINE_DECORATOR_MASK RUBY_ECONV_NEWLINE_DECORATOR_MASK
35518#define ECONV_NEWLINE_DECORATOR_READ_MASK RUBY_ECONV_NEWLINE_DECORATOR_READ_MASK
35519#define ECONV_NEWLINE_DECORATOR_WRITE_MASK RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK
35520#define ECONV_UNIVERSAL_NEWLINE_DECORATOR RUBY_ECONV_UNIVERSAL_NEWLINE_DECORATOR
35521#define ECONV_CRLF_NEWLINE_DECORATOR RUBY_ECONV_CRLF_NEWLINE_DECORATOR
35522#define ECONV_CR_NEWLINE_DECORATOR RUBY_ECONV_CR_NEWLINE_DECORATOR
35523#define ECONV_XML_TEXT_DECORATOR RUBY_ECONV_XML_TEXT_DECORATOR
35524#define ECONV_XML_ATTR_CONTENT_DECORATOR RUBY_ECONV_XML_ATTR_CONTENT_DECORATOR
35525#define ECONV_STATEFUL_DECORATOR_MASK RUBY_ECONV_STATEFUL_DECORATOR_MASK
35526#define ECONV_XML_ATTR_QUOTE_DECORATOR RUBY_ECONV_XML_ATTR_QUOTE_DECORATOR
35527#define ECONV_DEFAULT_NEWLINE_DECORATOR RUBY_ECONV_DEFAULT_NEWLINE_DECORATOR
35528#define ECONV_PARTIAL_INPUT RUBY_ECONV_PARTIAL_INPUT
35529#define ECONV_AFTER_OUTPUT RUBY_ECONV_AFTER_OUTPUT
35530#pragma GCC visibility pop
35531#define STR_NOEMBED FL_USER1
35532#define STR_SHARED FL_USER2
35533#undef rb_fstring_cstr
35534#pragma GCC visibility push(default)
35535#pragma GCC visibility pop
35536#pragma GCC visibility push(default)
35537#pragma GCC visibility pop
35538#define rb_fstring_lit(str) rb_fstring_new((str), rb_strlen_lit(str))
35539#define rb_fstring_literal(str) rb_fstring_lit(str)
35540#define rb_fstring_enc_lit(str,enc) rb_fstring_enc_new((str), rb_strlen_lit(str), (enc))
35541#define rb_fstring_enc_literal(str,enc) rb_fstring_enc_lit(str, enc)
35542#define rb_fstring_cstr(str) (__builtin_constant_p(str) ? rb_fstring_new((str), (long)strlen(str)) : (rb_fstring_cstr)(str))
35543#undef Check_Type
35544#define rb_raise_static(e,m) rb_raise_cstr_i((e), rb_str_new_static((m), rb_strlen_lit(m)))
35545#define rb_sys_fail_path(path) rb_sys_fail_path_in(RUBY_FUNCTION_NAME_STRING, path)
35546#define rb_syserr_fail_path(err,path) rb_syserr_fail_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
35547#define rb_syserr_new_path(err,path) rb_syserr_new_path_in(RUBY_FUNCTION_NAME_STRING, (err), (path))
35548#define rb_typeddata_is_instance_of rb_typeddata_is_instance_of_inline
35549#pragma GCC visibility push(default)
35550#pragma GCC visibility pop
35551#define INTERNAL_EVAL_H
35552#define id_signo ruby_static_id_signo
35553#define id_status ruby_static_id_status
35554#define INTERNAL_INITS_H
35555#define INTERNAL_MJIT_H
35556#define INTERNAL_OBJECT_H
35557#define INTERNAL_CLASS_H
35558#define RUBY_ID_TABLE_H 1
35559#define RCLASS_EXT(c) (RCLASS(c)->ptr)
35560#define RCLASS_IV_TBL(c) (RCLASS_EXT(c)->iv_tbl)
35561#define RCLASS_CONST_TBL(c) (RCLASS_EXT(c)->const_tbl)
35562#define RCLASS_M_TBL(c) (RCLASS_EXT(c)->m_tbl)
35563#define RCLASS_CALLABLE_M_TBL(c) (RCLASS_EXT(c)->callable_m_tbl)
35564#define RCLASS_CC_TBL(c) (RCLASS_EXT(c)->cc_tbl)
35565#define RCLASS_IV_INDEX_TBL(c) (RCLASS_EXT(c)->iv_index_tbl)
35566#define RCLASS_ORIGIN(c) (RCLASS_EXT(c)->origin_)
35567#define RCLASS_REFINED_CLASS(c) (RCLASS_EXT(c)->refined_class)
35568#define RCLASS_SERIAL(c) (RCLASS(c)->class_serial)
35569#define RCLASS_INCLUDER(c) (RCLASS_EXT(c)->includer)
35570#define RICLASS_IS_ORIGIN FL_USER5
35571#define RCLASS_CLONED FL_USER6
35572#define RICLASS_ORIGIN_SHARED_MTBL FL_USER8
35573#pragma GCC visibility push(default)
35574#pragma GCC visibility pop
35575#pragma clang diagnostic push
35576#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35577#pragma clang diagnostic pop
35578#pragma clang diagnostic push
35579#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35580#pragma clang diagnostic pop
35581#pragma clang diagnostic push
35582#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35583#pragma clang diagnostic pop
35584#pragma GCC visibility push(default)
35585#pragma GCC visibility pop
35586#pragma GCC visibility push(default)
35587#pragma GCC visibility pop
35588#define ROBJECT_IV_INDEX_TBL ROBJECT_IV_INDEX_TBL_inline
35589#define INTERNAL_PARSE_H
35590#pragma GCC visibility push(default)
35591#pragma GCC visibility pop
35592#define INTERNAL_PROC_H
35593#pragma GCC visibility push(default)
35594#pragma GCC visibility pop
35595#define INTERNAL_RE_H
35596#pragma GCC visibility push(default)
35597#pragma GCC visibility pop
35598#define INTERNAL_SYMBOL_H
35599#undef rb_sym_intern_ascii_cstr
35600#define rb_sym_intern_ascii_cstr(ptr) (__builtin_constant_p(ptr) ? rb_sym_intern_ascii((ptr), (long)strlen(ptr)) : rb_sym_intern_ascii_cstr(ptr))
35601#define RUBY_ISEQ_H 1
35602#define ISEQ_MAJOR_VERSION ((unsigned int)ruby_api_version[0])
35603#define ISEQ_MINOR_VERSION ((unsigned int)ruby_api_version[1])
35604#define ISEQ_COVERAGE(iseq) iseq->body->variable.coverage
35605#define ISEQ_COVERAGE_SET(iseq,cov) RB_OBJ_WRITE(iseq, &iseq->body->variable.coverage, cov)
35606#define ISEQ_LINE_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_LINES)
35607#define ISEQ_BRANCH_COVERAGE(iseq) RARRAY_AREF(ISEQ_COVERAGE(iseq), COVERAGE_INDEX_BRANCHES)
35608#define ISEQ_PC2BRANCHINDEX(iseq) iseq->body->variable.pc2branchindex
35609#define ISEQ_PC2BRANCHINDEX_SET(iseq,h) RB_OBJ_WRITE(iseq, &iseq->body->variable.pc2branchindex, h)
35610#define ISEQ_FLIP_CNT(iseq) (iseq)->body->variable.flip_count
35611#define ISEQ_TRACE_EVENTS (RUBY_EVENT_LINE | RUBY_EVENT_CLASS | RUBY_EVENT_END | RUBY_EVENT_CALL | RUBY_EVENT_RETURN| RUBY_EVENT_B_CALL| RUBY_EVENT_B_RETURN| RUBY_EVENT_COVERAGE_LINE| RUBY_EVENT_COVERAGE_BRANCH)
35612#define ISEQ_NOT_LOADED_YET IMEMO_FL_USER1
35613#define ISEQ_USE_COMPILE_DATA IMEMO_FL_USER2
35614#define ISEQ_TRANSLATED IMEMO_FL_USER3
35615#define ISEQ_MARKABLE_ISEQ IMEMO_FL_USER4
35616#define ISEQ_EXECUTABLE_P(iseq) (FL_TEST_RAW(((VALUE)iseq), ISEQ_NOT_LOADED_YET | ISEQ_USE_COMPILE_DATA) == 0)
35617#pragma GCC visibility push(default)
35618#define INITIAL_ISEQ_COMPILE_DATA_STORAGE_BUFF_SIZE (512)
35619#pragma GCC visibility pop
35620#define RUBY_MJIT_H 1
35621#define USE_DEBUG_COUNTER 0
35622#define RUBY_DEBUG_COUNTER_H 1
35623#define RB_DEBUG_COUNTER(name) RB_DEBUG_COUNTER_##name,
35624#undef RB_DEBUG_COUNTER
35625#define RB_DEBUG_COUNTER_INC(type) ((void)0)
35626#define RB_DEBUG_COUNTER_INC_UNLESS(type,cond) (!!(cond))
35627#define RB_DEBUG_COUNTER_INC_IF(type,cond) (!!(cond))
35628#define RB_DEBUG_COUNTER_ADD(type,num) ((void)0)
35629#define RB_DEBUG_COUNTER_SETMAX(type,num) 0
35630#pragma GCC visibility push(default)
35631#pragma GCC visibility pop
35632#define RUBY_H 1
35633#define HAVE_RUBY_DEFINES_H 1
35634#define HAVE_RUBY_ENCODING_H 1
35635#define HAVE_RUBY_INTERN_H 1
35636#define HAVE_RUBY_IO_H 1
35637#define HAVE_RUBY_MISSING_H 1
35638#define HAVE_RUBY_ONIGURUMA_H 1
35639#define HAVE_RUBY_RE_H 1
35640#define HAVE_RUBY_REGEX_H 1
35641#define HAVE_RUBY_RUBY_H 1
35642#define HAVE_RUBY_ST_H 1
35643#define HAVE_RUBY_THREAD_H 1
35644#define HAVE_RUBY_UTIL_H 1
35645#define HAVE_RUBY_VERSION_H 1
35646#define HAVE_RUBY_VM_H 1
35647#pragma GCC visibility push(default)
35648#pragma GCC visibility pop
35649#define JIT_ISEQ_SIZE_THRESHOLD 1000
35650#define RUBY_VM_H 1
35651#pragma GCC visibility push(default)
35652#pragma GCC visibility pop
35653#define RUBY_VM_CALLINFO_H
35654#define VM_CALL_ARGS_SPLAT (0x01 << VM_CALL_ARGS_SPLAT_bit)
35655#define VM_CALL_ARGS_BLOCKARG (0x01 << VM_CALL_ARGS_BLOCKARG_bit)
35656#define VM_CALL_FCALL (0x01 << VM_CALL_FCALL_bit)
35657#define VM_CALL_VCALL (0x01 << VM_CALL_VCALL_bit)
35658#define VM_CALL_ARGS_SIMPLE (0x01 << VM_CALL_ARGS_SIMPLE_bit)
35659#define VM_CALL_BLOCKISEQ (0x01 << VM_CALL_BLOCKISEQ_bit)
35660#define VM_CALL_KWARG (0x01 << VM_CALL_KWARG_bit)
35661#define VM_CALL_KW_SPLAT (0x01 << VM_CALL_KW_SPLAT_bit)
35662#define VM_CALL_TAILCALL (0x01 << VM_CALL_TAILCALL_bit)
35663#define VM_CALL_SUPER (0x01 << VM_CALL_SUPER_bit)
35664#define VM_CALL_ZSUPER (0x01 << VM_CALL_ZSUPER_bit)
35665#define VM_CALL_OPT_SEND (0x01 << VM_CALL_OPT_SEND_bit)
35666#define VM_CALL_KW_SPLAT_MUT (0x01 << VM_CALL_KW_SPLAT_MUT_bit)
35667#define USE_EMBED_CI 1
35668#define CI_EMBED_TAG_bits 1
35669#define CI_EMBED_ARGC_bits 15
35670#define CI_EMBED_FLAG_bits 16
35671#define CI_EMBED_ID_bits 32
35672#define CI_EMBED_FLAG 0x01
35673#define CI_EMBED_ARGC_SHFT (CI_EMBED_TAG_bits)
35674#define CI_EMBED_ARGC_MASK ((((VALUE)1)<<CI_EMBED_ARGC_bits) - 1)
35675#define CI_EMBED_FLAG_SHFT (CI_EMBED_TAG_bits + CI_EMBED_ARGC_bits)
35676#define CI_EMBED_FLAG_MASK ((((VALUE)1)<<CI_EMBED_FLAG_bits) - 1)
35677#define CI_EMBED_ID_SHFT (CI_EMBED_TAG_bits + CI_EMBED_ARGC_bits + CI_EMBED_FLAG_bits)
35678#define CI_EMBED_ID_MASK ((((VALUE)1)<<CI_EMBED_ID_bits) - 1)
35679#define vm_ci_new(mid,flag,argc,kwarg) vm_ci_new_(mid, flag, argc, kwarg, __FILE__, __LINE__)
35680#define vm_ci_new_runtime(mid,flag,argc,kwarg) vm_ci_new_runtime_(mid, flag, argc, kwarg, __FILE__, __LINE__)
35681#define VM_CI_EMBEDDABLE_P(mid,flag,argc,kwarg) (((mid ) & ~CI_EMBED_ID_MASK) ? false : ((flag) & ~CI_EMBED_FLAG_MASK) ? false : ((argc) & ~CI_EMBED_ARGC_MASK) ? false : (kwarg) ? false : true)
35682#define vm_ci_new_id(mid,flag,argc,must_zero) ((const struct rb_callinfo *) ((((VALUE)(mid )) << CI_EMBED_ID_SHFT) | (((VALUE)(flag)) << CI_EMBED_FLAG_SHFT) | (((VALUE)(argc)) << CI_EMBED_ARGC_SHFT) | RUBY_FIXNUM_FLAG))
35683#define VM_CALLINFO_NOT_UNDER_GC IMEMO_FL_USER0
35684#define VM_CI_ON_STACK(mid_,flags_,argc_,kwarg_) (struct rb_callinfo) { .flags = T_IMEMO | (imemo_callinfo << FL_USHIFT) | VM_CALLINFO_NOT_UNDER_GC, .mid = mid_, .flag = flags_, .argc = argc_, .kwarg = kwarg_, }
35685#define VM_CALLCACHE_UNMARKABLE IMEMO_FL_USER0
35686#define VM_CC_ON_STACK(clazz,call,aux,cme) (struct rb_callcache) { .flags = T_IMEMO | (imemo_callcache << FL_USHIFT) | VM_CALLCACHE_UNMARKABLE, .klass = clazz, .cme_ = cme, .call_ = call, .aux_ = aux, }
35687#define vm_cc_empty() rb_vm_empty_cc()
35688#define RUBY_DEBUG_H
35689#pragma GCC visibility push(default)
35690#define dpv(h,v) ruby_debug_print_value(-1, 0, (h), (v))
35691#define dp(v) ruby_debug_print_value(-1, 0, "", (v))
35692#define dpi(i) ruby_debug_print_id(-1, 0, "", (i))
35693#define dpn(n) ruby_debug_print_node(-1, 0, "", (n))
35694#pragma GCC visibility pop
35695#define USE_RUBY_DEBUG_LOG 0
35696#define _RUBY_DEBUG_LOG(fmt,...) ruby_debug_log(__FILE__, __LINE__, __func__, fmt, __VA_ARGS__)
35697#define RUBY_DEBUG_LOG(fmt,...)
35698#define RUBY_DEBUG_LOG2(file,line,fmt,...)
35699#define RUBY_VM_EXEC_H
35700#define debugs
35701#define DEBUG_ENTER_INSN(insn)
35702#define DEBUG_END_INSN()
35703#define throwdebug if(0)printf
35704#define USE_INSNS_COUNTER 0
35705#define LABEL(x) INSN_LABEL_##x
35706#define ELABEL(x) INSN_ELABEL_##x
35707#define LABEL_PTR(x) RB_GNUC_EXTENSION(&&LABEL(x))
35708#define INSN_ENTRY_SIG(insn) if (0) fprintf(stderr, "exec: %s@(%"PRIdPTRDIFF", %"PRIdPTRDIFF")@%s:%u\n", #insn, (reg_pc - reg_cfp->iseq->body->iseq_encoded), (reg_cfp->pc - reg_cfp->iseq->body->iseq_encoded), RSTRING_PTR(rb_iseq_path(reg_cfp->iseq)), rb_iseq_line_no(reg_cfp->iseq, reg_pc - reg_cfp->iseq->body->iseq_encoded)); if (USE_INSNS_COUNTER) vm_insns_counter_count_insn(BIN(insn));
35709#define INSN_DISPATCH_SIG(insn)
35710#define INSN_ENTRY(insn) LABEL(insn): INSN_ENTRY_SIG(insn);
35711#define TC_DISPATCH(insn) INSN_DISPATCH_SIG(insn); RB_GNUC_EXTENSION_BLOCK(goto *(void const *)GET_CURRENT_INSN()); ;
35712#define END_INSN(insn) DEBUG_END_INSN(); TC_DISPATCH(insn);
35713#define INSN_DISPATCH() TC_DISPATCH(__START__) {
35714#define END_INSNS_DISPATCH() rb_bug("unknown insn: %"PRIdVALUE, GET_CURRENT_INSN()); }
35715#define NEXT_INSN() TC_DISPATCH(__NEXT_INSN__)
35716#define START_OF_ORIGINAL_INSN(x) start_of_##x:
35717#define DISPATCH_ORIGINAL_INSN(x) goto start_of_##x;
35718#define VM_SP_CNT(ec,sp) ((sp) - (ec)->vm_stack)
35719#define THROW_EXCEPTION(exc) do { ec->errinfo = (VALUE)(exc); EC_JUMP_TAG(ec, ec->tag->state); } while (0)
35720#define SCREG(r) (reg_##r)
35721#define VM_DEBUG_STACKOVERFLOW 0
35722#define CHECK_VM_STACK_OVERFLOW_FOR_INSN(cfp,margin)
35723#define INSN_LABEL2(insn,name) INSN_LABEL_ ## insn ## _ ## name
35724#define INSN_LABEL(x) INSN_LABEL2(NAME_OF_CURRENT_INSN, x)
35725#define RUBY_INSNHELPER_H
35726#pragma GCC visibility push(default)
35727#pragma GCC visibility pop
35728#define COLLECT_USAGE_INSN(insn)
35729#define COLLECT_USAGE_OPERAND(insn,n,op)
35730#define COLLECT_USAGE_REGISTER(reg,s)
35731#define PUSH(x) (SET_SV(x), INC_SP(1))
35732#define TOPN(n) (*(GET_SP()-(n)-1))
35733#define POPN(n) (DEC_SP(n))
35734#define POP() (DEC_SP(1))
35735#define STACK_ADDR_FROM_TOP(n) (GET_SP()-(n))
35736#define VM_REG_CFP (reg_cfp)
35737#define VM_REG_PC (VM_REG_CFP->pc)
35738#define VM_REG_SP (VM_REG_CFP->sp)
35739#define VM_REG_EP (VM_REG_CFP->ep)
35740#define RESTORE_REGS() do { VM_REG_CFP = ec->cfp; } while (0)
35741#define COLLECT_USAGE_REGISTER_HELPER(a,b,v) (v)
35742#define GET_PC() (COLLECT_USAGE_REGISTER_HELPER(PC, GET, VM_REG_PC))
35743#define SET_PC(x) (VM_REG_PC = (COLLECT_USAGE_REGISTER_HELPER(PC, SET, (x))))
35744#define GET_CURRENT_INSN() (*GET_PC())
35745#define GET_OPERAND(n) (GET_PC()[(n)])
35746#define ADD_PC(n) (SET_PC(VM_REG_PC + (n)))
35747#define JUMP(dst) (SET_PC(VM_REG_PC + (dst)))
35748#define GET_CFP() (COLLECT_USAGE_REGISTER_HELPER(CFP, GET, VM_REG_CFP))
35749#define GET_EP() (COLLECT_USAGE_REGISTER_HELPER(EP, GET, VM_REG_EP))
35750#define SET_EP(x) (VM_REG_EP = (COLLECT_USAGE_REGISTER_HELPER(EP, SET, (x))))
35751#define GET_LEP() (VM_EP_LEP(GET_EP()))
35752#define GET_SP() (COLLECT_USAGE_REGISTER_HELPER(SP, GET, VM_REG_SP))
35753#define SET_SP(x) (VM_REG_SP = (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
35754#define INC_SP(x) (VM_REG_SP += (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
35755#define DEC_SP(x) (VM_REG_SP -= (COLLECT_USAGE_REGISTER_HELPER(SP, SET, (x))))
35756#define SET_SV(x) (*GET_SP() = (x))
35757#define GET_ISEQ() (GET_CFP()->iseq)
35758#define GET_PREV_EP(ep) ((VALUE *)((ep)[VM_ENV_DATA_INDEX_SPECVAL] & ~0x03))
35759#define GET_SELF() (COLLECT_USAGE_REGISTER_HELPER(SELF, GET, GET_CFP()->self))
35760#define GET_BLOCK_HANDLER() (GET_LEP()[VM_ENV_DATA_INDEX_SPECVAL])
35761#define SETUP_CANARY(cond) if (cond) {} else {}
35762#define CHECK_CANARY(cond,insn) if (cond) {(void)(insn);}
35763#define PREV_CLASS_SERIAL() (ruby_vm_class_serial)
35764#define NEXT_CLASS_SERIAL() (++ruby_vm_class_serial)
35765#define GET_GLOBAL_METHOD_STATE() (ruby_vm_global_method_state)
35766#define INC_GLOBAL_METHOD_STATE() (++ruby_vm_global_method_state)
35767#define GET_GLOBAL_CONSTANT_STATE() (ruby_vm_global_constant_state)
35768#define INC_GLOBAL_CONSTANT_STATE() (++ruby_vm_global_constant_state)
35769#define IS_ARGS_SPLAT(ci) (vm_ci_flag(ci) & VM_CALL_ARGS_SPLAT)
35770#define IS_ARGS_KEYWORD(ci) (vm_ci_flag(ci) & VM_CALL_KWARG)
35771#define IS_ARGS_KW_SPLAT(ci) (vm_ci_flag(ci) & VM_CALL_KW_SPLAT)
35772#define IS_ARGS_KW_OR_KW_SPLAT(ci) (vm_ci_flag(ci) & (VM_CALL_KWARG | VM_CALL_KW_SPLAT))
35773#define IS_ARGS_KW_SPLAT_MUT(ci) (vm_ci_flag(ci) & VM_CALL_KW_SPLAT_MUT)
35774#define BUILTIN_H_INCLUDED
35775#define RB_BUILTIN_FUNCTION(_i,_name,_fname,_arity,_compiler) { .name = #_name, .func_ptr = (void *)_fname, .argc = _arity, .index = _i, .compiler = _compiler, }
35776#define _PROBES_H
35777#define DTRACE_PROBES_DISABLED 1
35778#define RUBY_DTRACE_METHOD_ENTRY_ENABLED() 0
35779#define RUBY_DTRACE_METHOD_ENTRY(classname,methodname,filename,lineno) do {} while (0)
35780#define RUBY_DTRACE_METHOD_RETURN_ENABLED() 0
35781#define RUBY_DTRACE_METHOD_RETURN(classname,methodname,filename,lineno) do {} while (0)
35782#define RUBY_DTRACE_CMETHOD_ENTRY_ENABLED() 0
35783#define RUBY_DTRACE_CMETHOD_ENTRY(classname,methodname,filename,lineno) do {} while (0)
35784#define RUBY_DTRACE_CMETHOD_RETURN_ENABLED() 0
35785#define RUBY_DTRACE_CMETHOD_RETURN(classname,methodname,filename,lineno) do {} while (0)
35786#define RUBY_DTRACE_REQUIRE_ENTRY_ENABLED() 0
35787#define RUBY_DTRACE_REQUIRE_ENTRY(rquiredfile,filename,lineno) do {} while (0)
35788#define RUBY_DTRACE_REQUIRE_RETURN_ENABLED() 0
35789#define RUBY_DTRACE_REQUIRE_RETURN(requiredfile,filename,lineno) do {} while (0)
35790#define RUBY_DTRACE_FIND_REQUIRE_ENTRY_ENABLED() 0
35791#define RUBY_DTRACE_FIND_REQUIRE_ENTRY(requiredfile,filename,lineno) do {} while (0)
35792#define RUBY_DTRACE_FIND_REQUIRE_RETURN_ENABLED() 0
35793#define RUBY_DTRACE_FIND_REQUIRE_RETURN(requiredfile,filename,lineno) do {} while (0)
35794#define RUBY_DTRACE_LOAD_ENTRY_ENABLED() 0
35795#define RUBY_DTRACE_LOAD_ENTRY(loadedfile,filename,lineno) do {} while (0)
35796#define RUBY_DTRACE_LOAD_RETURN_ENABLED() 0
35797#define RUBY_DTRACE_LOAD_RETURN(loadedfile,filename,lineno) do {} while (0)
35798#define RUBY_DTRACE_RAISE_ENABLED() 0
35799#define RUBY_DTRACE_RAISE(classname,filename,lineno) do {} while (0)
35800#define RUBY_DTRACE_OBJECT_CREATE_ENABLED() 0
35801#define RUBY_DTRACE_OBJECT_CREATE(classname,filename,lineno) do {} while (0)
35802#define RUBY_DTRACE_ARRAY_CREATE_ENABLED() 0
35803#define RUBY_DTRACE_ARRAY_CREATE(length,filename,lineno) do {} while (0)
35804#define RUBY_DTRACE_HASH_CREATE_ENABLED() 0
35805#define RUBY_DTRACE_HASH_CREATE(length,filename,lineno) do {} while (0)
35806#define RUBY_DTRACE_STRING_CREATE_ENABLED() 0
35807#define RUBY_DTRACE_STRING_CREATE(length,filename,lineno) do {} while (0)
35808#define RUBY_DTRACE_SYMBOL_CREATE_ENABLED() 0
35809#define RUBY_DTRACE_SYMBOL_CREATE(str,filename,lineno) do {} while (0)
35810#define RUBY_DTRACE_PARSE_BEGIN_ENABLED() 0
35811#define RUBY_DTRACE_PARSE_BEGIN(sourcefile,lineno) do {} while (0)
35812#define RUBY_DTRACE_PARSE_END_ENABLED() 0
35813#define RUBY_DTRACE_PARSE_END(sourcefile,lineno) do {} while (0)
35814#define RUBY_DTRACE_INSN_ENABLED() 0
35815#define RUBY_DTRACE_INSN(insns_name) do {} while (0)
35816#define RUBY_DTRACE_INSN_OPERAND_ENABLED() 0
35817#define RUBY_DTRACE_INSN_OPERAND(val,insns_name) do {} while (0)
35818#define RUBY_DTRACE_GC_MARK_BEGIN_ENABLED() 0
35819#define RUBY_DTRACE_GC_MARK_BEGIN() do {} while (0)
35820#define RUBY_DTRACE_GC_MARK_END_ENABLED() 0
35821#define RUBY_DTRACE_GC_MARK_END() do {} while (0)
35822#define RUBY_DTRACE_GC_SWEEP_BEGIN_ENABLED() 0
35823#define RUBY_DTRACE_GC_SWEEP_BEGIN() do {} while (0)
35824#define RUBY_DTRACE_GC_SWEEP_END_ENABLED() 0
35825#define RUBY_DTRACE_GC_SWEEP_END() do {} while (0)
35826#define RUBY_DTRACE_METHOD_CACHE_CLEAR_ENABLED() 0
35827#define RUBY_DTRACE_METHOD_CACHE_CLEAR(class,filename,lineno) do {} while (0)
35828#define RUBY_PROBES_HELPER_H
35829#pragma GCC visibility push(default)
35830#pragma GCC visibility pop
35831#define RUBY_DTRACE_METHOD_HOOK(name,ec,klazz,id) do { if (UNLIKELY(RUBY_DTRACE_##name##_ENABLED())) { struct ruby_dtrace_method_hook_args args; if (rb_dtrace_setup(ec, klazz, id, &args)) { RUBY_DTRACE_##name(args.classname, args.methodname, args.filename, args.line_no); } } } while (0)
35832#define RUBY_DTRACE_METHOD_ENTRY_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(METHOD_ENTRY, ec, klass, id)
35833#define RUBY_DTRACE_METHOD_RETURN_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(METHOD_RETURN, ec, klass, id)
35834#define RUBY_DTRACE_CMETHOD_ENTRY_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(CMETHOD_ENTRY, ec, klass, id)
35835#define RUBY_DTRACE_CMETHOD_RETURN_HOOK(ec,klass,id) RUBY_DTRACE_METHOD_HOOK(CMETHOD_RETURN, ec, klass, id)
35836#pragma clang diagnostic push
35837#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35838#pragma clang diagnostic pop
35839#define CONSTANT_H
35840#define RB_CONST_PRIVATE_P(ce) (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PRIVATE)
35841#define RB_CONST_PUBLIC_P(ce) (((ce)->flag & CONST_VISIBILITY_MASK) == CONST_PUBLIC)
35842#define RB_CONST_DEPRECATED_P(ce) ((ce)->flag & CONST_DEPRECATED)
35843#pragma GCC visibility push(default)
35844#pragma GCC visibility pop
35845#define INTERNAL_COMPAR_H
35846#define STRING_P(s) (RB_TYPE_P((s), T_STRING) && CLASS_OF(s) == rb_cString)
35847#define NEW_CMP_OPT_MEMO(type,value) NEW_PARTIAL_MEMO_FOR(type, value, cmp_opt)
35848#define CMP_OPTIMIZABLE_BIT(type) (1U << TOKEN_PASTE(cmp_opt_,type))
35849#define CMP_OPTIMIZABLE(data,type) (((data).opt_inited & CMP_OPTIMIZABLE_BIT(type)) ? ((data).opt_methods & CMP_OPTIMIZABLE_BIT(type)) : (((data).opt_inited |= CMP_OPTIMIZABLE_BIT(type)), rb_method_basic_definition_p(TOKEN_PASTE(rb_c,type), id_cmp) && ((data).opt_methods |= CMP_OPTIMIZABLE_BIT(type))))
35850#define OPTIMIZED_CMP(a,b,data) ((FIXNUM_P(a) && FIXNUM_P(b) && CMP_OPTIMIZABLE(data, Integer)) ? (((long)a > (long)b) ? 1 : ((long)a < (long)b) ? -1 : 0) : (STRING_P(a) && STRING_P(b) && CMP_OPTIMIZABLE(data, String)) ? rb_str_cmp(a, b) : (RB_FLOAT_TYPE_P(a) && RB_FLOAT_TYPE_P(b) && CMP_OPTIMIZABLE(data, Float)) ? rb_float_cmp(a, b) : rb_cmpint(rb_funcallv(a, id_cmp, 1, &b), a, b))
35851#define INTERNAL_HASH_H
35852#define RHASH_AR_TABLE_MAX_SIZE SIZEOF_VALUE
35853#define RHASH_LEV_MASK (FL_USER13 | FL_USER14 | FL_USER15 | FL_USER16 | FL_USER17 | FL_USER18 | FL_USER19)
35854#define RHASH(obj) (R_CAST(RHash)(obj))
35855#pragma GCC visibility push(default)
35856#pragma GCC visibility pop
35857#pragma GCC visibility push(default)
35858#define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h, __FILE__, __LINE__)
35859#pragma GCC visibility pop
35860#define INTERNAL_NUMERIC_H
35861#define INTERNAL_BIGNUM_H
35862#define BDIGIT unsigned int
35863#define SIZEOF_BDIGIT SIZEOF_INT
35864#define BDIGIT_DBL unsigned LONG_LONG
35865#define BDIGIT_DBL_SIGNED LONG_LONG
35866#define PRI_BDIGIT_PREFIX ""
35867#define PRI_BDIGIT_DBL_PREFIX PRI_LL_PREFIX
35868#define SIZEOF_ACTUAL_BDIGIT SIZEOF_BDIGIT
35869#define PRIdBDIGIT PRI_BDIGIT_PREFIX"d"
35870#define PRIiBDIGIT PRI_BDIGIT_PREFIX"i"
35871#define PRIoBDIGIT PRI_BDIGIT_PREFIX"o"
35872#define PRIuBDIGIT PRI_BDIGIT_PREFIX"u"
35873#define PRIxBDIGIT PRI_BDIGIT_PREFIX"x"
35874#define PRIXBDIGIT PRI_BDIGIT_PREFIX"X"
35875#define PRIdBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"d"
35876#define PRIiBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"i"
35877#define PRIoBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"o"
35878#define PRIuBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"u"
35879#define PRIxBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"x"
35880#define PRIXBDIGIT_DBL PRI_BDIGIT_DBL_PREFIX"X"
35881#define RBIGNUM(obj) (R_CAST(RBignum)(obj))
35882#define BIGNUM_SIGN_BIT FL_USER1
35883#define BIGNUM_EMBED_FLAG ((VALUE)FL_USER2)
35884#define BIGNUM_EMBED_LEN_NUMBITS 3
35885#define BIGNUM_EMBED_LEN_MASK (~(~(VALUE)0U << BIGNUM_EMBED_LEN_NUMBITS) << BIGNUM_EMBED_LEN_SHIFT)
35886#define BIGNUM_EMBED_LEN_SHIFT (FL_USHIFT+3)
35887#define BIGNUM_EMBED_LEN_MAX (SIZEOF_VALUE*RVALUE_EMBED_LEN_MAX/SIZEOF_ACTUAL_BDIGIT)
35888#pragma GCC visibility push(default)
35889#pragma GCC visibility pop
35890#pragma GCC visibility push(default)
35891#pragma GCC visibility pop
35892#define INTERNAL_BITS_H
35893#define HALF_LONG_MSB ((SIGNED_VALUE)1<<((SIZEOF_LONG*CHAR_BIT-1)/2))
35894#define SIGNED_INTEGER_TYPE_P(T) (0 > ((T)0)-1)
35895#define SIGNED_INTEGER_MIN(T) ((sizeof(T) == sizeof(int8_t)) ? ((T)INT8_MIN) : ((sizeof(T) == sizeof(int16_t)) ? ((T)INT16_MIN) : ((sizeof(T) == sizeof(int32_t)) ? ((T)INT32_MIN) : ((sizeof(T) == sizeof(int64_t)) ? ((T)INT64_MIN) : 0))))
35896#define SIGNED_INTEGER_MAX(T) ((T)(SIGNED_INTEGER_MIN(T) ^ ((T)~(T)0)))
35897#define UNSIGNED_INTEGER_MAX(T) ((T)~(T)0)
35898#define MUL_OVERFLOW_P(a,b) __extension__ ({ __typeof__(a) c; __builtin_mul_overflow((a), (b), &c); })
35899#define MUL_OVERFLOW_SIGNED_INTEGER_P(a,b,min,max) ( (a) == 0 ? 0 : (a) == -1 ? (b) < -(max) : (a) > 0 ? ((b) > 0 ? (max) / (a) < (b) : (min) / (a) > (b)) : ((b) > 0 ? (min) / (a) < (b) : (max) / (a) > (b)))
35900#define MUL_OVERFLOW_FIXNUM_P(a,b) MUL_OVERFLOW_SIGNED_INTEGER_P(a, b, FIXNUM_MIN, FIXNUM_MAX)
35901#define MUL_OVERFLOW_LONG_LONG_P(a,b) MUL_OVERFLOW_P(a, b)
35902#define MUL_OVERFLOW_LONG_P(a,b) MUL_OVERFLOW_P(a, b)
35903#define MUL_OVERFLOW_INT_P(a,b) MUL_OVERFLOW_P(a, b)
35904#define bit_length(x) (unsigned int) (sizeof(x) <= sizeof(int32_t) ? 32 - nlz_int32((uint32_t)(x)) : sizeof(x) <= sizeof(int64_t) ? 64 - nlz_int64((uint64_t)(x)) : 128 - nlz_int128((uint128_t)(x)))
35905#define swap16 ruby_swap16
35906#define swap32 ruby_swap32
35907#define swap64 ruby_swap64
35908#define INTERNAL_FIXNUM_H
35909#define DLONG int128_t
35910#define DL2NUM(x) (RB_FIXABLE(x) ? LONG2FIX(x) : rb_int128t2big(x))
35911#define ROUND_TO(mode,even,up,down) ((mode) == RUBY_NUM_ROUND_HALF_EVEN ? even : (mode) == RUBY_NUM_ROUND_HALF_UP ? up : down)
35912#define ROUND_FUNC(mode,name) ROUND_TO(mode, name##_half_even, name##_half_up, name##_half_down)
35913#define ROUND_CALL(mode,name,args) ROUND_TO(mode, name##_half_even args, name##_half_up args, name##_half_down args)
35914#define ROUND_DEFAULT RUBY_NUM_ROUND_HALF_UP
35915#define RFLOAT(obj) (R_CAST(RFloat)(obj))
35916#define rb_float_value rb_float_value_inline
35917#define rb_float_new rb_float_new_inline
35918#pragma GCC visibility push(default)
35919#pragma GCC visibility pop
35920#pragma GCC visibility push(default)
35921#pragma GCC visibility pop
35922#define INTERNAL_RANDOM_H
35923#define INTERNAL_VARIABLE_H
35924#define ROBJECT_TRANSIENT_FLAG FL_USER13
35925#pragma GCC visibility push(default)
35926#pragma GCC visibility pop
35927#pragma GCC visibility push(default)
35928#pragma GCC visibility pop
35929#define RUBY_TOPLEVEL_VARIABLE_H
35930#define BIN(n) YARVINSN_##n
35931#define ASSERT_VM_INSTRUCTION_SIZE(array) STATIC_ASSERT(numberof_##array, numberof(array) == VM_INSTRUCTION_SIZE)
35932#define vm_check_canary(ec,sp)
35933#define vm_check_frame(a,b,c,d)
35934#define vm_push_frame_debug_counter_inc(ec,cfp,t)
35935#pragma clang diagnostic push
35936#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35937#pragma clang diagnostic pop
35938#pragma clang diagnostic push
35939#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35940#pragma clang diagnostic pop
35941#pragma clang diagnostic push
35942#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35943#pragma clang diagnostic pop
35944#pragma clang diagnostic push
35945#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35946#pragma clang diagnostic pop
35947#pragma clang diagnostic push
35948#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35949#pragma clang diagnostic pop
35950#pragma clang diagnostic push
35951#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35952#pragma clang diagnostic pop
35953#pragma clang diagnostic push
35954#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35955#pragma clang diagnostic pop
35956#pragma clang diagnostic push
35957#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35958#pragma clang diagnostic pop
35959#pragma clang diagnostic push
35960#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35961#pragma clang diagnostic pop
35962#pragma clang diagnostic push
35963#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35964#pragma clang diagnostic pop
35965#define EQ_UNREDEFINED_P(t) BASIC_OP_UNREDEFINED_P(BOP_EQ, t##_REDEFINED_OP_FLAG)
35966#undef EQ_UNREDEFINED_P
35967#define CHECK_CMP_NAN(a,b)
35968#define KW_SPECIFIED_BITS_MAX (32-1)
35969#define USE_OPT_HIST 0
35970#define CHECK_CFP_CONSISTENCY(func) (LIKELY(vm_cfp_consistent_p(ec, reg_cfp)) ? (void)0 : rb_bug(func ": cfp consistency error (%p, %p)", (void *)reg_cfp, (void *)(ec->cfp+1)))
35971#pragma clang diagnostic push
35972#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35973#pragma clang diagnostic pop
35974#pragma clang diagnostic push
35975#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35976#pragma clang diagnostic pop
35977#pragma clang diagnostic push
35978#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35979#pragma clang diagnostic pop
35980#pragma clang diagnostic push
35981#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35982#pragma clang diagnostic pop
35983#pragma clang diagnostic push
35984#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35985#pragma clang diagnostic pop
35986#define id_cmp idCmp
35987#undef id_cmp
35988#pragma clang diagnostic push
35989#pragma clang diagnostic ignored "-Waddress-of-packed-member"
35990#pragma clang diagnostic pop
35991#define VM_TRACE_HOOK(target_event,val) do { if ((pc_events & (target_event)) & enabled_flags) { vm_trace_hook(ec, reg_cfp, pc, pc_events, (target_event), global_hooks, local_hooks, (val)); } } while (0)
35992#define id_mesg idMesg
static VALUE RB_CHR2FIX(unsigned char c)
Converts a C's unsigned char into an instance of rb_cInteger.
Definition: char.h:56
static char rb_num2char_inline(VALUE x)
Converts an instance of rb_cNumeric into C's char.
Definition: char.h:73
@ RUBY_ENC_CODERANGE_MASK
Where the coderange resides.
Definition: coderange.h:48
@ RUBY_ENC_CODERANGE_VALID
The object's encoding and contents are consistent each other.
Definition: coderange.h:42
@ RUBY_ENC_CODERANGE_7BIT
The object holds 0 to 127 inclusive and nothing else.
Definition: coderange.h:39
@ RUBY_ENC_CODERANGE_UNKNOWN
The object's coderange is unclear yet.
Definition: coderange.h:36
@ RUBY_ENC_CODERANGE_BROKEN
The object holds invalid/malformed/broken character(s).
Definition: coderange.h:45
static int rb_isdigit(int c)
Our own locale-insensitive version of isdigit(3).
Definition: ctype.h:302
static int rb_isupper(int c)
Our own locale-insensitive version of isupper(3).
Definition: ctype.h:232
static int rb_iscntrl(int c)
Our own locale-insensitive version of iscntrl(3).
Definition: ctype.h:418
static int rb_ispunct(int c)
Our own locale-insensitive version of ispunct(3).
Definition: ctype.h:465
static int rb_isalnum(int c)
Our own locale-insensitive version of isalnum(3).
Definition: ctype.h:326
static int rb_isxdigit(int c)
Our own locale-insensitive version of isxdigit(3).
Definition: ctype.h:349
static int rb_isspace(int c)
Our own locale-insensitive version of isspace(3).
Definition: ctype.h:395
static int rb_isascii(int c)
Our own locale-insensitive version of isascii(3).
Definition: ctype.h:209
static int rb_toupper(int c)
Our own locale-insensitive version of toupper(3).
Definition: ctype.h:539
unsigned long ruby_strtoul(const char *str, char **endptr, int base)
Our own locale-insensitive version of strtoul(3).
Definition: util.c:133
static int rb_tolower(int c)
Our own locale-insensitive version of tolower(3).
Definition: ctype.h:514
static int rb_isgraph(int c)
Our own locale-insensitive version of isgraph(3).
Definition: ctype.h:489
static int rb_isalpha(int c)
Our own locale-insensitive version of isalpha(3).
Definition: ctype.h:279
static int rb_islower(int c)
Our own locale-insensitive version of islower(3).
Definition: ctype.h:255
static int rb_isprint(int c)
Identical to rb_isgraph(), except it also returns true for ‘’ '`.
Definition: ctype.h:442
static int rb_isblank(int c)
Our own locale-insensitive version of isblank(3).
Definition: ctype.h:372
#define rb_define_method_id(klass, mid, func, arity)
Defines klass#mid.
Definition: cxxanyargs.hpp:673
#define rb_define_singleton_method(klass, mid, func, arity)
Defines klass.mid.
Definition: cxxanyargs.hpp:685
#define rb_define_protected_method(klass, mid, func, arity)
Defines klass#mid and makes it protected.
Definition: cxxanyargs.hpp:681
#define rb_define_private_method(klass, mid, func, arity)
Defines klass#mid and makes it private.
Definition: cxxanyargs.hpp:677
double rb_float_value(VALUE num)
Extracts its double value from an instance of rb_cFloat.
Definition: numeric.c:6418
VALUE rb_float_new_in_heap(double d)
Identical to rb_float_new(), except it does not generate Flonums.
Definition: numeric.c:1014
VALUE rb_float_new(double d)
Converts a C's double into an instance of rb_cFloat.
Definition: numeric.c:6425
int rb_enc_tolower(int c, rb_encoding *enc)
Identical to rb_tolower(), except it additionally takes an encoding.
Definition: encoding.c:1300
int rb_enc_toupper(int c, rb_encoding *enc)
Identical to rb_toupper(), except it additionally takes an encoding.
Definition: encoding.c:1294
VALUE rb_enc_vsprintf(rb_encoding *enc, const char *fmt, va_list ap)
Identical to rb_enc_sprintf(), except it takes a va_list instead of variadic arguments.
Definition: sprintf.c:1149
VALUE rb_enc_sprintf(rb_encoding *enc, const char *fmt,...)
Identical to rb_sprintf(), except it additionally takes an encoding.
Definition: sprintf.c:1182
void rb_add_event_hook(rb_event_hook_func_t func, rb_event_flag_t events, VALUE data)
Registers an event hook function.
Definition: vm_trace.c:186
int rb_remove_event_hook(rb_event_hook_func_t func)
Removes the passed function from the list of event hooks.
Definition: vm_trace.c:294
void(* rb_event_hook_func_t)(rb_event_flag_t evflag, VALUE data, VALUE self, ID mid, VALUE klass)
Type of event hooks.
Definition: event.h:115
uint32_t rb_event_flag_t
Represents event(s).
Definition: event.h:103
ruby_fl_ushift
This is an enum because GDB wants it (rather than a macro).
Definition: fl_type.h:162
@ RUBY_FL_USHIFT
Number of bits in ruby_fl_type that are not open to users.
Definition: fl_type.h:167
static VALUE RB_OBJ_FROZEN_RAW(VALUE obj)
This is an implenentation detail of RB_OBJ_FROZEN().
Definition: fl_type.h:906
static bool RB_OBJ_TAINTABLE(VALUE obj)
Definition: fl_type.h:788
static VALUE RB_FL_TEST(VALUE obj, VALUE flags)
Tests if the given flag(s) are set or not.
Definition: fl_type.h:527
static VALUE RB_FL_TEST_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_TEST().
Definition: fl_type.h:501
static bool RB_FL_ABLE(VALUE obj)
Checks if the object is flaggable.
Definition: fl_type.h:476
static bool RB_FL_ANY_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_ANY().
Definition: fl_type.h:550
static void rb_obj_freeze_inline(VALUE x)
Prevents further modifications to the given object.
Definition: fl_type.h:951
static bool RB_FL_ANY(VALUE obj, VALUE flags)
Identical to RB_FL_TEST(), except it returns bool.
Definition: fl_type.h:566
static void RB_FL_SET_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_SET().
Definition: fl_type.h:638
static bool RB_FL_ALL(VALUE obj, VALUE flags)
Identical to RB_FL_ANY(), except it mandates all passed flags be set.
Definition: fl_type.h:600
static bool RB_OBJ_FROZEN(VALUE obj)
Checks if an object is frozen.
Definition: fl_type.h:921
static bool RB_OBJ_TAINTED(VALUE obj)
Definition: fl_type.h:822
static VALUE RB_OBJ_TAINTED_RAW(VALUE obj)
Definition: fl_type.h:805
static void RB_OBJ_INFECT(VALUE dst, VALUE src)
Definition: fl_type.h:884
static void RB_FL_UNSET_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_UNSET().
Definition: fl_type.h:698
@ RUBY_FL_DUPPED
Definition: fl_type.h:439
static void RB_FL_SET(VALUE obj, VALUE flags)
Sets the given flag(s).
Definition: fl_type.h:658
static void RB_OBJ_INFECT_RAW(VALUE dst, VALUE src)
Definition: fl_type.h:868
static void RB_FL_REVERSE(VALUE obj, VALUE flags)
Reverses the flags.
Definition: fl_type.h:769
static void RB_FL_UNSET(VALUE obj, VALUE flags)
Clears the given flag(s).
Definition: fl_type.h:713
static void RB_OBJ_FREEZE_RAW(VALUE obj)
This is an implenentation detail of RB_OBJ_FREEZE().
Definition: fl_type.h:939
static void RB_FL_REVERSE_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_REVERSE().
Definition: fl_type.h:753
static bool RB_FL_ALL_RAW(VALUE obj, VALUE flags)
This is an implenentation detail of RB_FL_ALL().
Definition: fl_type.h:584
@ RUBY_FL_PROMOTED1
This flag has something to do with our garbage collector.
Definition: fl_type.h:240
@ RUBY_ELTS_SHARED
This flag has something to do with data structures.
Definition: fl_type.h:405
@ RUBY_FL_USER9
User-defined flag.
Definition: fl_type.h:369
@ RUBY_FL_SINGLETON
This flag has something to do with an object's class.
Definition: fl_type.h:430
@ RUBY_FL_USER8
User-defined flag.
Definition: fl_type.h:368
@ RUBY_FL_USER11
User-defined flag.
Definition: fl_type.h:371
@ RUBY_FL_USER5
User-defined flag.
Definition: fl_type.h:365
@ RUBY_FL_TAINT
Definition: fl_type.h:278
@ RUBY_FL_USER3
User-defined flag.
Definition: fl_type.h:363
@ RUBY_FL_USER17
User-defined flag.
Definition: fl_type.h:377
@ RUBY_FL_USER10
User-defined flag.
Definition: fl_type.h:370
@ RUBY_FL_USER7
User-defined flag.
Definition: fl_type.h:367
@ RUBY_FL_WB_PROTECTED
Definition: fl_type.h:207
@ RUBY_FL_PROMOTED0
This flag has something to do with our garbage collector.
Definition: fl_type.h:223
@ RUBY_FL_USER14
User-defined flag.
Definition: fl_type.h:374
@ RUBY_FL_USER6
User-defined flag.
Definition: fl_type.h:366
@ RUBY_FL_USER16
User-defined flag.
Definition: fl_type.h:376
@ RUBY_FL_EXIVAR
This flag has something to do with instance variables.
Definition: fl_type.h:345
@ RUBY_FL_UNTRUSTED
Definition: fl_type.h:305
@ RUBY_FL_PROMOTED
This flag has something to do with our garbage collector.
Definition: fl_type.h:257
@ RUBY_FL_USER0
User-defined flag.
Definition: fl_type.h:360
@ RUBY_FL_FREEZE
This flag has something to do with data immutability.
Definition: fl_type.h:356
@ RUBY_FL_USER15
User-defined flag.
Definition: fl_type.h:375
@ RUBY_FL_SEEN_OBJ_ID
This flag has something to do with object IDs.
Definition: fl_type.h:332
@ RUBY_FL_USER2
User-defined flag.
Definition: fl_type.h:362
@ RUBY_FL_USER4
User-defined flag.
Definition: fl_type.h:364
@ RUBY_FL_USER18
User-defined flag.
Definition: fl_type.h:378
@ RUBY_FL_USER1
User-defined flag.
Definition: fl_type.h:361
@ RUBY_FL_FINALIZE
This flag has something to do with finalisers.
Definition: fl_type.h:271
@ RUBY_FL_USER19
User-defined flag.
Definition: fl_type.h:380
@ RUBY_FL_USER13
User-defined flag.
Definition: fl_type.h:373
@ RUBY_FL_USER12
User-defined flag.
Definition: fl_type.h:372
static void RB_OBJ_TAINT_RAW(VALUE obj)
Definition: fl_type.h:837
static void RB_OBJ_TAINT(VALUE obj)
Definition: fl_type.h:852
int ruby_glob(const char *pattern, int flags, ruby_glob_func *func, VALUE arg)
Identical to rb_glob(), except it returns opaque exception states instead of raising exceptions.
Definition: dir.c:2703
void rb_glob(const char *pattern, void(*func)(const char *path, VALUE arg, void *enc), VALUE arg)
The "glob" operator.
int ruby_brace_glob(const char *pattern, int flags, ruby_glob_func *func, VALUE arg)
Identical to ruby_glob(), @shyouhei currently suspects.
Definition: dir.c:2843
int ruby_glob_func(const char *path, VALUE arg, void *enc)
Type of a glob callback function.
Definition: glob.h:49
void rb_include_module(VALUE, VALUE)
Includes a module to a class.
Definition: class.c:1101
VALUE rb_define_class(const char *, VALUE)
Defines a top-level class.
Definition: class.c:896
void rb_extend_object(VALUE obj, VALUE module)
Extend the object with the module.
Definition: eval.c:1676
void rb_prepend_module(VALUE, VALUE)
Identical to rb_include_module(), except it "prepends" the passed module to the klass,...
Definition: class.c:1356
VALUE rb_define_class_under(VALUE, const char *, VALUE)
Defines a class under the namespace of outer.
Definition: class.c:928
VALUE rb_class_boot(VALUE)
A utility function that wraps class_alloc.
Definition: class.c:252
VALUE rb_define_module(const char *)
Defines a top-level module.
Definition: class.c:1006
void rb_class_modify_check(VALUE)
Asserts that klass is not a frozen class.
Definition: eval.c:422
VALUE rb_class_inherited(VALUE, VALUE)
Calls Class::inherited.
Definition: class.c:887
VALUE rb_define_module_under(VALUE, const char *)
Defines a module under the namespace of outer.
Definition: class.c:1030
VALUE rb_singleton_class_get(VALUE obj)
Returns the singleton class of obj, or nil if obj is not a singleton object.
Definition: class.c:2146
void rb_define_alias(VALUE, const char *, const char *)
Defines an alias of a method.
Definition: class.c:2208
void rb_define_module_function(VALUE module, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a module function for a module.
Definition: class.c:2192
void rb_need_block(void)
Declares that the current method needs a block.
Definition: eval.c:872
void rb_define_attr(VALUE, const char *, int, int)
Defines public accessor method(s) for an attribute.
Definition: class.c:2214
void rb_undef_method(VALUE, const char *)
Defines an undef of a method.
Definition: class.c:2030
void rb_define_method(VALUE klass, const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a method.
Definition: class.c:2006
int rb_keyword_given_p(void)
Determines if the current method is given a keyword argument.
Definition: eval.c:864
int rb_block_given_p(void)
Determines if the current method is given a block.
Definition: eval.c:851
void rb_define_global_function(const char *name, VALUE(*func)(ANYARGS), int argc)
Defines a global function.
Definition: class.c:2202
#define rb_str_buf_new2
Old name of rb_str_buf_new_cstr.
Definition: string.h:1679
VALUE rb_complex_polar(VALUE x, VALUE y)
Old name of rb_complex_new_polar.
Definition: complex.c:1541
@ RUBY_ECONV_STATEFUL_DECORATOR_MASK
(Unclear; seems unused).
Definition: transcode.h:506
@ RUBY_ECONV_CRLF_NEWLINE_DECORATOR
CR to CRLF conversion shall happen.
Definition: transcode.h:494
@ RUBY_ECONV_AFTER_OUTPUT
Instructs the converter to stop after output.
Definition: transcode.h:549
@ RUBY_ECONV_FLAGS_PLACEHOLDER
Placeholder (not used)
Definition: transcode.h:553
@ RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK
(Unclear; seems unused).
Definition: transcode.h:488
@ RUBY_ECONV_ERROR_HANDLER_MASK
Mask for error handling related bits.
Definition: transcode.h:461
@ RUBY_ECONV_UNDEF_MASK
Special handling of undefined conversion are there.
Definition: transcode.h:470
@ RUBY_ECONV_XML_ATTR_CONTENT_DECORATOR
Texts shall be AttrValue escaped.
Definition: transcode.h:503
@ RUBY_ECONV_INVALID_REPLACE
Invalid sequences shall be replaced.
Definition: transcode.h:467
@ RUBY_ECONV_XML_TEXT_DECORATOR
Texts shall be XML-escaped.
Definition: transcode.h:500
@ RUBY_ECONV_NEWLINE_DECORATOR_MASK
Newline converters are there.
Definition: transcode.h:482
@ RUBY_ECONV_UNDEF_HEX_CHARREF
Undefined characters shall be escaped.
Definition: transcode.h:476
@ RUBY_ECONV_PARTIAL_INPUT
Indicates the input is a part of much larger one.
Definition: transcode.h:546
@ RUBY_ECONV_UNIVERSAL_NEWLINE_DECORATOR
Universal newline mode.
Definition: transcode.h:491
@ RUBY_ECONV_INVALID_MASK
Special handling of invalid sequences are there.
Definition: transcode.h:464
@ RUBY_ECONV_UNDEF_REPLACE
Undefined characters shall be replaced.
Definition: transcode.h:473
@ RUBY_ECONV_DECORATOR_MASK
Decorators are there.
Definition: transcode.h:479
@ RUBY_ECONV_XML_ATTR_QUOTE_DECORATOR
Texts shall be AttrValue escaped.
Definition: transcode.h:509
@ RUBY_ECONV_DEFAULT_NEWLINE_DECORATOR
Newline decorator's default.
Definition: transcode.h:512
@ RUBY_ECONV_NEWLINE_DECORATOR_READ_MASK
(Unclear; seems unused).
Definition: transcode.h:485
@ RUBY_ECONV_CR_NEWLINE_DECORATOR
CRLF to CR conversion shall happen.
Definition: transcode.h:497
void ruby_stop(int ex)
Calls ruby_cleanup() and exits the process.
Definition: eval.c:289
int ruby_exec_node(void *n)
Identical to ruby_run_node(), except it returns an opaque execution status.
Definition: eval.c:325
int ruby_setup(void)
Initializes the VM and builtin libraries.
Definition: eval.c:65
void ruby_finalize(void)
Runs the VM finalization processes.
Definition: eval.c:168
void ruby_init_stack(volatile VALUE *addr)
Set stack bottom of Ruby implementation.
void ruby_script(const char *name)
Sets the current script name to this value.
Definition: ruby.c:2495
void ruby_set_argv(int argc, char **argv)
Sets argv that ruby understands.
Definition: ruby.c:2610
void ruby_set_script_name(VALUE name)
Identical to ruby_script(), except it takes the name as a Ruby String instance.
Definition: ruby.c:2508
int ruby_cleanup(int ex)
Destructs the VM.
Definition: eval.c:176
size_t ruby_stack_length(VALUE **p)
Queries what Ruby thinks is the machine stack.
Definition: gc.c:6248
int ruby_stack_check(void)
Checks for stack overflow.
Definition: gc.c:6288
void ruby_init_loadpath(void)
Sets up $LOAD_PATH.
Definition: ruby.c:619
void * ruby_process_options(int argc, char **argv)
Identical to ruby_options(), except it raises ruby-level exceptions on failure.
Definition: ruby.c:2625
void ruby_prog_init(void)
Defines built-in variables.
Definition: ruby.c:2578
void ruby_sig_finalize(void)
Clear signal handlers.
Definition: signal.c:1497
void ruby_incpush(const char *path)
Appends the given path to the end of the load path.
Definition: ruby.c:458
void rb_notimplement(void)
Definition: error.c:3144
void rb_mod_sys_fail(VALUE mod, const char *mesg)
Identical to rb_sys_fail(), except it takes additional module to extend the exception object before r...
Definition: error.c:3280
rb_warning_category_t
Warning categories.
Definition: error.h:43
VALUE rb_eLocalJumpError
LocalJumpError exception.
Definition: eval.c:48
void rb_raise(VALUE exc, const char *fmt,...)
Exception entry point.
Definition: error.c:3101
void rb_compile_warn(const char *file, int line, const char *fmt,...)
Identical to rb_compile_warning(), except it reports always regardless of runtime -W flag.
Definition: error.c:361
void rb_mod_syserr_fail(VALUE mod, int e, const char *mesg)
Identical to rb_mod_sys_fail(), except it does not depend on C global variable errno.
Definition: error.c:3294
VALUE rb_rescue2(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*r_proc)(VALUE, VALUE), VALUE data2,...)
An equivalent of rescue clause.
Definition: eval.c:880
void rb_exc_raise(VALUE mesg)
Raises an exception in the current thread.
Definition: eval.c:671
void rb_syserr_fail(int e, const char *mesg)
Raises appropriate exception that represents a C errno.
Definition: error.c:3213
void rb_bug(const char *fmt,...)
Interpreter panic switch.
Definition: error.c:803
void rb_iter_break(void)
Breaks from a block.
Definition: vm.c:1822
void rb_sys_fail(const char *mesg)
Converts a C errno into a Ruby exception, then raises it.
Definition: error.c:3225
VALUE rb_eZeroDivError
ZeroDivisionError exception.
Definition: numeric.c:194
void rb_readwrite_syserr_fail(enum rb_io_wait_readwrite waiting, int err, const char *msg)
Identical to rb_readwrite_sys_fail(), except it does not depend on C global variable errno.
Definition: io.c:14003
void rb_sys_warning(const char *fmt,...)
Identical to rb_sys_fail(), except it does not raise an exception to render a warning instead.
Definition: error.c:3362
VALUE rb_eIOError
IOError exception.
Definition: io.c:188
VALUE rb_syserr_new_str(int n, VALUE arg)
Identical to rb_syserr_new(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3207
void rb_mod_syserr_fail_str(VALUE mod, int e, VALUE mesg)
Identical to rb_mod_syserr_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3301
void rb_error_frozen(const char *what)
Identical to rb_frozen_error_raise(), except its raising exception has a message like "can't modify f...
Definition: error.c:3417
void rb_set_errinfo(VALUE err)
Sets the current exception ($!) to the given value.
Definition: eval.c:1861
VALUE rb_eRegexpError
RegexpError exception.
Definition: re.c:30
void rb_syserr_fail_str(int e, VALUE mesg)
Identical to rb_syserr_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3219
VALUE rb_eEOFError
EOFError exception.
Definition: io.c:187
VALUE rb_vrescue2(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*r_proc)(VALUE, VALUE), VALUE data2, va_list args)
Identical to rb_rescue2(), except it takes va_list instead of variadic number of arguments.
Definition: eval.c:891
void rb_fatal(const char *fmt,...)
Raises the unsung "fatal" exception.
Definition: error.c:3152
void rb_readwrite_sys_fail(enum rb_io_wait_readwrite waiting, const char *msg)
Raises appropriate exception using the parameters.
Definition: io.c:13997
void rb_iter_break_value(VALUE val)
Identical to rb_iter_break(), except it additionally takes the "value" of this breakage.
Definition: vm.c:1828
void rb_invalid_str(const char *str, const char *type)
Honestly I don't understand the name, but it raises an instance of rb_eArgError.
Definition: error.c:2160
void rb_exc_fatal(VALUE mesg)
Raises a fatal error in the current thread.
Definition: eval.c:684
VALUE * rb_ruby_verbose_ptr(void)
This is an implementation detail of ruby_verbose.
Definition: vm.c:4011
VALUE rb_eStopIteration
StopIteration exception.
Definition: enumerator.c:141
VALUE rb_eFloatDomainError
FloatDomainError exception.
Definition: numeric.c:195
const char void rb_warn(const char *,...)
Identical to rb_warning(), except it reports always regardless of runtime -W flag.
Definition: error.c:419
void rb_error_frozen_object(VALUE frozen_obj)
Identical to rb_error_frozen(), except it takes arbitrary Ruby object instead of C's string.
Definition: error.c:3449
void rb_bug_errno(const char *mesg, int errno_arg)
This is a wrapper of rb_bug() which automatically constructs appropriate message from the passed errn...
Definition: error.c:831
void rb_compile_warning(const char *file, int line, const char *fmt,...)
Issues a compile-time warning that happens at __file__:__line__.
Definition: error.c:376
VALUE rb_rescue(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*r_proc)(VALUE, VALUE), VALUE data2)
Identical to rb_rescue2(), except it does not take a list of exception classes.
Definition: eval.c:951
VALUE * rb_ruby_debug_ptr(void)
This is an implementation detail of ruby_debug.
Definition: vm.c:4018
VALUE rb_ensure(VALUE(*b_proc)(VALUE), VALUE data1, VALUE(*e_proc)(VALUE), VALUE data2)
An equivalent to ensure clause.
Definition: eval.c:980
VALUE rb_errinfo(void)
This is the same as $! in Ruby.
Definition: eval.c:1855
VALUE rb_eSysStackError
SystemStackError exception.
Definition: eval.c:49
VALUE rb_syserr_new(int, const char *)
Creates an exception object that represents the given C errno.
Definition: error.c:3199
void rb_sys_fail_str(VALUE mesg)
Identical to rb_sys_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3231
void rb_unexpected_type(VALUE x, int t)
Fails with the given object's type incompatibility to the type.
Definition: error.c:1030
void rb_mod_sys_fail_str(VALUE mod, VALUE mesg)
Identical to rb_mod_sys_fail(), except it takes the message in Ruby's String instead of C's.
Definition: error.c:3287
VALUE rb_eThreadError
ThreadError exception.
Definition: eval.c:869
void rb_exit(int status)
Terminates the current execution context.
Definition: process.c:4503
VALUE rb_eMathDomainError
Math::DomainError exception.
Definition: math.c:30
void rb_check_type(VALUE x, int t)
This was the old implementation of Check_Type(), but they diverged.
Definition: error.c:1007
void rb_warning(const char *fmt,...)
Issues a warning.
Definition: error.c:450
@ RB_WARN_CATEGORY_DEPRECATED
Warning is for deprecated features.
Definition: error.h:48
@ RB_WARN_CATEGORY_EXPERIMENTAL
Warning is for experimental features.
Definition: error.h:51
@ RB_WARN_CATEGORY_NONE
Category unspecified.
Definition: error.h:45
VALUE rb_cRational
Rational class.
Definition: rational.c:47
VALUE rb_class_superclass(VALUE)
Returns the superclass of klass.
Definition: object.c:1963
VALUE rb_cUnboundMethod
UnboundMethod class.
Definition: proc.c:46
VALUE rb_cTime
Time class.
Definition: time.c:647
VALUE rb_cDir
Dir class.
Definition: dir.c:458
VALUE rb_cComplex
Complex class.
Definition: complex.c:38
VALUE rb_cArray
Array class.
Definition: array.c:40
VALUE rb_mProcess
Process module.
Definition: process.c:8764
VALUE rb_mMath
Math module.
Definition: math.c:29
VALUE rb_cIO
IO class.
Definition: io.c:186
VALUE rb_mEnumerable
Enumerable module.
Definition: enum.c:27
VALUE rb_cMatch
MatchData class.
Definition: re.c:956
VALUE rb_cStruct
Struct class.
Definition: struct.c:31
VALUE rb_cEnumerator
Enumerator class.
Definition: enumerator.c:126
VALUE rb_cInteger
Module class.
Definition: numeric.c:192
VALUE rb_stdin
STDIN constant.
Definition: io.c:199
VALUE rb_cStat
File::Stat class.
Definition: file.c:176
VALUE rb_Hash(VALUE)
Equivalent to Kernel#Hash in Ruby.
Definition: object.c:3661
VALUE rb_cBinding
Binding class.
Definition: proc.c:48
VALUE rb_cRegexp
Regexp class.
Definition: re.c:2459
VALUE rb_obj_frozen_p(VALUE obj)
Just calls RB_OBJ_FROZEN() inside.
Definition: object.c:1159
VALUE rb_mGC
GC module.
Definition: gc.c:1151
VALUE rb_obj_init_copy(VALUE, VALUE)
Default implementation of #initialize_copy.
Definition: object.c:501
VALUE rb_cHash
Hash class.
Definition: hash.c:92
VALUE rb_stderr
STDERR constant.
VALUE rb_cNumeric
Numeric class.
Definition: numeric.c:190
static VALUE rb_class_of(VALUE obj)
Object to class mapping function.
Definition: globals.h:172
VALUE rb_cRandom
Random class.
Definition: random.c:229
VALUE rb_cEncoding
Encoding class.
Definition: encoding.c:57
VALUE rb_cSymbol
Sumbol class.
Definition: string.c:80
VALUE rb_cThread
Thread class.
Definition: vm.c:401
VALUE rb_class_inherited_p(VALUE scion, VALUE ascendant)
Determines if the given two modules are relatives.
Definition: object.c:1575
VALUE rb_cRange
Range class.
Definition: range.c:31
VALUE rb_class_real(VALUE klass)
Finds a "real" class.
Definition: object.c:178
VALUE rb_mFileTest
FileTest module.
Definition: file.c:175
VALUE rb_mWaitReadable
IO::WaitReadable module.
Definition: io.c:189
VALUE rb_mWaitWritable
IO::WaitReadable module.
Definition: io.c:190
VALUE rb_mComparable
Comparable module.
Definition: compar.c:19
VALUE rb_class_search_ancestor(VALUE klass, VALUE super)
Internal header for Object.
Definition: object.c:810
VALUE rb_cFloat
Float class.
Definition: numeric.c:191
VALUE rb_cProc
Proc class.
Definition: proc.c:49
VALUE rb_cFile
File class.
Definition: file.c:174
VALUE rb_stdout
STDOUT constant.
VALUE rb_cString
String class.
Definition: string.c:79
VALUE rb_cMethod
Method class.
Definition: proc.c:47
int ruby_run_node(void *n)
Runs the given compiled source and exits this process.
Definition: eval.c:312
void ruby_init(void)
Calls ruby_setup() and check error.
Definition: eval.c:98
void * ruby_options(int argc, char **argv)
Processes command line arguments and compiles the Ruby source to execute.
Definition: eval.c:109
void ruby_show_copyright(void)
Prints the copyright notice of the CRuby interpreter to stdout.
Definition: version.c:145
void ruby_sysinit(int *argc, char ***argv)
Initializes the process for libruby.
Definition: ruby.c:2678
void ruby_show_version(void)
Prints the version information of the CRuby interpreter to stdout.
Definition: version.c:123
int ruby_executable_node(void *n, int *status)
Checks the return value of ruby_options().
Definition: eval.c:295
int rb_enc_dummy_p(rb_encoding *enc)
Queries if the passed encoding is dummy.
Definition: encoding.c:203
int rb_enc_precise_mbclen(const char *p, const char *e, rb_encoding *enc)
Queries the number of bytes of the character at the passed pointer.
Definition: encoding.c:1234
int rb_enc_get_index(VALUE obj)
Queries the index of the encoding of the passed object, if any.
Definition: encoding.c:979
int rb_to_encoding_index(VALUE obj)
Obtains a encoding index from a wider range of objects (than rb_enc_find_index()).
Definition: encoding.c:267
int rb_filesystem_encindex(void)
Identical to rb_filesystem_encoding(), except it returns the encoding's index instead of the encoding...
Definition: encoding.c:1579
VALUE rb_enc_associate(VALUE obj, rb_encoding *enc)
Identical to rb_enc_associate_index(), except it takes an encoding itself instead of its index.
Definition: encoding.c:1066
rb_encoding * rb_utf8_encoding(void)
Queries the encoding that represents UTF-8.
Definition: encoding.c:1527
rb_encoding * rb_ascii8bit_encoding(void)
Queries the encoding that represents ASCII-8BIT a.k.a.
Definition: encoding.c:1515
int rb_enc_codelen(int code, rb_encoding *enc)
Queries the number of bytes requested to represent the passed code point using the passed encoding.
Definition: encoding.c:1284
rb_encoding * rb_to_encoding(VALUE obj)
Identical to rb_find_encoding(), except it raises an exception instead of returning NULL.
Definition: encoding.c:329
const OnigEncodingType rb_encoding
The type of encoding.
Definition: encoding.h:116
rb_encoding * rb_filesystem_encoding(void)
Queries the "filesystem" encoding.
Definition: encoding.c:1592
rb_encoding * rb_default_internal_encoding(void)
Queries the "default internal" encoding.
Definition: encoding.c:1724
void rb_enc_copy(VALUE dst, VALUE src)
Destructively copies the encoding of the latter object to that of former one.
Definition: encoding.c:1192
int rb_utf8_encindex(void)
Identical to rb_utf8_encoding(), except it returns the encoding's index instead of the encoding itsel...
Definition: encoding.c:1533
int rb_enc_fast_mbclen(const char *p, const char *e, rb_encoding *enc)
Identical to rb_enc_mbclen() unless the character at p overruns e.
Definition: encoding.c:1216
rb_encoding * rb_enc_get(VALUE obj)
Identical to rb_enc_get_index(), except the return type.
Definition: encoding.c:1072
rb_encoding * rb_enc_from_index(int idx)
Identical to rb_find_encoding(), except it takes an encoding index instead of a Ruby object.
Definition: encoding.c:414
int rb_ascii8bit_encindex(void)
Identical to rb_ascii8bit_encoding(), except it returns the encoding's index instead of the encoding ...
Definition: encoding.c:1521
unsigned int rb_enc_codepoint_len(const char *p, const char *e, int *len, rb_encoding *enc)
Queries the code point of character pointed by the passed pointer.
Definition: encoding.c:1270
int rb_enc_unicode_p(rb_encoding *enc)
Queries if the passed encoding is either one of UTF-8/16/32.
Definition: encoding.c:689
int rb_enc_to_index(rb_encoding *enc)
Queries the index of the encoding.
Definition: encoding.c:197
void rb_enc_set_index(VALUE obj, int encindex)
Destructively assigns an encoding (via its index) to an object.
Definition: encoding.c:1030
VALUE rb_locale_charmap(VALUE klass)
Returns a platform-depended "charmap" of the current locale.
Definition: localeinit.c:91
void rb_enc_set_default_internal(VALUE encoding)
Destructively assigns the passed encoding as the default internal encoding.
Definition: encoding.c:1774
VALUE rb_enc_default_external(void)
Identical to rb_default_external_encoding(), except it returns the Ruby-level counterpart instance of...
Definition: encoding.c:1651
rb_encoding * rb_enc_find(const char *name)
Identical to rb_find_encoding(), except it takes a C's string instead of Ruby's.
Definition: encoding.c:918
VALUE rb_enc_from_encoding(rb_encoding *enc)
Queries the Ruby-level counterpart instance of rb_cEncoding that corresponds to the passed encoding.
Definition: encoding.c:188
rb_encoding * rb_find_encoding(VALUE obj)
Identical to rb_to_encoding_index(), except the return type.
Definition: encoding.c:336
int rb_define_dummy_encoding(const char *name)
Creates a new "dummy" encoding.
Definition: encoding.c:617
static unsigned int rb_enc_codepoint(const char *p, const char *e, rb_encoding *enc)
Queries the code point of character pointed by the passed pointer.
Definition: encoding.h:587
rb_encoding * rb_default_external_encoding(void)
Queries the "default external" encoding.
Definition: encoding.c:1637
int rb_locale_encindex(void)
Identical to rb_locale_encoding(), except it returns the encoding's index instead of the encoding its...
Definition: encoding.c:1553
int rb_char_to_option_kcode(int c, int *option, int *kcode)
Converts a character option to its encoding.
Definition: re.c:331
rb_encoding * rb_enc_check(VALUE str1, VALUE str2)
Identical to rb_enc_compatible(), except it raises an exception instead of returning NULL.
Definition: encoding.c:1097
int rb_enc_mbclen(const char *p, const char *e, rb_encoding *enc)
Queries the number of bytes of the character at the passed pointer.
Definition: encoding.c:1222
int rb_enc_capable(VALUE obj)
Queries if the passed object can have its encoding.
Definition: encoding.c:943
VALUE rb_enc_default_internal(void)
Identical to rb_default_internal_encoding(), except it returns the Ruby-level counterpart instance of...
Definition: encoding.c:1733
VALUE rb_enc_associate_index(VALUE obj, int encindex)
Identical to rb_enc_set_index(), except it additionally does contents fix-up depending on the passed ...
Definition: encoding.c:1038
rb_encoding * rb_enc_compatible(VALUE str1, VALUE str2)
Look for the "common" encoding between the two.
Definition: encoding.c:1176
int rb_enc_replicate(const char *name, rb_encoding *src)
Creates a new encoding, using the passed one as a template.
Definition: encoding.c:550
rb_encoding * rb_locale_encoding(void)
Queries the encoding that represents the current locale.
Definition: encoding.c:1573
rb_encoding * rb_usascii_encoding(void)
Queries the encoding that represents US-ASCII.
Definition: encoding.c:1539
void rb_enc_set_default_external(VALUE encoding)
Destructively assigns the passed encoding as the default external encoding.
Definition: encoding.c:1691
int rb_enc_find_index(const char *name)
Queries the index of the encoding.
Definition: encoding.c:881
int rb_enc_alias(const char *alias, const char *orig)
Registers an "alias" name.
Definition: encoding.c:721
static int rb_enc_code_to_mbclen(int c, rb_encoding *enc)
Identical to rb_enc_codelen(), except it returns 0 for invalid code points.
Definition: encoding.h:635
int rb_enc_ascget(const char *p, const char *e, int *len, rb_encoding *enc)
Queries the code point of character pointed by the passed pointer.
Definition: encoding.c:1246
int rb_usascii_encindex(void)
Identical to rb_usascii_encoding(), except it returns the encoding's index instead of the encoding it...
Definition: encoding.c:1545
VALUE rb_enc_reg_new(const char *ptr, long len, rb_encoding *enc, int opts)
Identical to rb_reg_new(), except it additionally takes an encoding.
Definition: re.c:3159
VALUE rb_str_conv_enc(VALUE str, rb_encoding *from, rb_encoding *to)
Encoding conversion main routine.
Definition: string.c:1167
int rb_enc_str_coderange(VALUE str)
Scans the passed string to collect its code range.
Definition: string.c:775
VALUE rb_enc_uint_chr(unsigned int code, rb_encoding *enc)
Encodes the passed code point into a series of bytes.
Definition: numeric.c:3747
VALUE rb_enc_str_new_static(const char *ptr, long len, rb_encoding *enc)
Identical to rb_enc_str_new(), except it takes a C string literal.
Definition: string.c:1033
char * rb_enc_nth(const char *head, const char *tail, long nth, rb_encoding *enc)
Queries the n-th character.
Definition: string.c:2674
VALUE rb_str_conv_enc_opts(VALUE str, rb_encoding *from, rb_encoding *to, int ecflags, VALUE ecopts)
Identical to rb_str_conv_enc(), except it additionally takes IO encoder options.
Definition: string.c:1052
long rb_memsearch(const void *x, long m, const void *y, long n, rb_encoding *enc)
Looks for the passed string in the passed buffer.
Definition: re.c:249
long rb_enc_strlen(const char *head, const char *tail, rb_encoding *enc)
Counts the number of characters of the passed string, according to the passed encoding.
Definition: string.c:2020
VALUE rb_enc_str_buf_cat(VALUE str, const char *ptr, long len, rb_encoding *enc)
Identical to rb_str_cat(), except it additionally takes an encoding.
Definition: string.c:3213
VALUE rb_enc_str_new_cstr(const char *ptr, rb_encoding *enc)
Identical to rb_enc_str_new(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:979
VALUE rb_enc_str_new(const char *ptr, long len, rb_encoding *enc)
Identical to rb_enc_str_new(), except it additionally takes an encoding.
Definition: string.c:939
VALUE rb_str_export_to_enc(VALUE obj, rb_encoding *enc)
Identical to rb_str_export(), except it additionally takes an encoding.
Definition: string.c:1272
VALUE rb_external_str_new_with_enc(const char *ptr, long len, rb_encoding *enc)
Identical to rb_external_str_new(), except it additionally takes an encoding.
Definition: string.c:1173
int rb_enc_str_asciionly_p(VALUE str)
Queries if the passed string is "ASCII only".
Definition: string.c:789
VALUE rb_obj_encoding(VALUE obj)
Identical to rb_enc_get_index(), except the return type.
Definition: encoding.c:1206
long rb_str_coderange_scan_restartable(const char *str, const char *end, rb_encoding *enc, int *cr)
Scans the passed string until it finds something odd.
Definition: string.c:667
int rb_enc_symname_p(const char *str, rb_encoding *enc)
Identical to rb_symname_p(), except it additionally takes an encoding.
Definition: symbol.c:203
ID rb_intern3(const char *name, long len, rb_encoding *enc)
Identical to rb_intern2(), except it additionally takes an encoding.
Definition: symbol.c:711
VALUE rb_check_symbol_cstr(const char *ptr, long len, rb_encoding *enc)
Identical to rb_check_id_cstr(), except for the return type.
Definition: symbol.c:1162
int rb_enc_symname2_p(const char *name, long len, rb_encoding *enc)
Identical to rb_enc_symname_p(), except it additionally takes the passed string's length.
Definition: symbol.c:406
ID rb_check_id_cstr(const char *ptr, long len, rb_encoding *enc)
Identical to rb_check_id(), except it takes a pointer to a memory region instead of Ruby's string.
Definition: symbol.c:1151
int rb_econv_prepare_options(VALUE opthash, VALUE *ecopts, int ecflags)
Identical to rb_econv_prepare_opts(), except it additionally takes the initial value of flags.
Definition: transcode.c:2537
VALUE rb_econv_open_exc(const char *senc, const char *denc, int ecflags)
Creates a rb_eConverterNotFoundError exception object (but does not raise).
Definition: transcode.c:2039
const char * rb_econv_encoding_to_insert_output(rb_econv_t *ec)
Queries an encoding name which best suits for rb_econv_insert_output()'s last parameter.
Definition: transcode.c:1506
int rb_econv_prepare_opts(VALUE opthash, VALUE *ecopts)
Splits a keyword arguments hash (that for instance String#encode took) into a set of enum ruby_econv_...
Definition: transcode.c:2582
rb_econv_result_t rb_econv_convert(rb_econv_t *ec, const unsigned char **source_buffer_ptr, const unsigned char *source_buffer_end, unsigned char **destination_buffer_ptr, unsigned char *destination_buffer_end, int flags)
Converts a string from an encoding to another.
Definition: transcode.c:1449
rb_econv_result_t
return value of rb_econv_convert()
Definition: transcode.h:30
@ econv_incomplete_input
The conversion stopped in middle of reading a character, possibly due to a partial read of a socket e...
Definition: transcode.h:69
@ econv_finished
The conversion stopped after converting everything.
Definition: transcode.h:57
@ econv_undefined_conversion
The conversion stopped when it found a character in the input which cannot be representable in the ou...
Definition: transcode.h:41
@ econv_after_output
The conversion stopped after writing something to somewhere, before reading everything.
Definition: transcode.h:63
@ econv_source_buffer_empty
The conversion stopped because there is no input.
Definition: transcode.h:51
@ econv_destination_buffer_full
The conversion stopped because there is no destination.
Definition: transcode.h:46
@ econv_invalid_byte_sequence
The conversion stopped when it found an invalid sequence.
Definition: transcode.h:35
int rb_econv_putbackable(rb_econv_t *ec)
Queries if rb_econv_putback() makes sense, i.e.
Definition: transcode.c:1745
int rb_econv_has_convpath_p(const char *from_encoding, const char *to_encoding)
Queries if there is more than one way to convert between the passed two encodings.
Definition: transcode.c:3139
rb_econv_t * rb_econv_open(const char *source_encoding, const char *destination_encoding, int ecflags)
Creates a new instance of struct rb_econv_t.
Definition: transcode.c:1072
VALUE rb_econv_str_append(rb_econv_t *ec, VALUE src, VALUE dst, int flags)
Identical to rb_econv_str_convert(), except it appends the conversion result to the additionally pass...
Definition: transcode.c:1868
VALUE rb_econv_substr_append(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, VALUE dst, int flags)
Identical to rb_econv_str_append(), except it appends only a part of the passed string with conversio...
Definition: transcode.c:1859
const char * rb_econv_asciicompat_encoding(const char *encname)
Queries the passed encoding's corresponding ASCII compatible encoding.
Definition: transcode.c:1789
int rb_econv_insert_output(rb_econv_t *ec, const unsigned char *str, size_t len, const char *str_encoding)
Appends the passed string to the passed converter's output buffer.
Definition: transcode.c:1590
VALUE rb_econv_str_convert(rb_econv_t *ec, VALUE src, int flags)
Identical to rb_econv_convert(), except it takes Ruby's string instead of C's pointer.
Definition: transcode.c:1880
rb_econv_t * rb_econv_open_opts(const char *source_encoding, const char *destination_encoding, int ecflags, VALUE ecopts)
Identical to rb_econv_open(), except it additionally takes a hash of optional strings.
Definition: transcode.c:2588
int rb_econv_decorate_at_last(rb_econv_t *ec, const char *decorator_name)
Identical to rb_econv_decorate_at_first(), except it adds to the opposite direction.
Definition: transcode.c:1928
void rb_econv_binmode(rb_econv_t *ec)
This badly named function does not set the destination encoding to binary, but instead just nullifies...
Definition: transcode.c:1945
int rb_econv_decorate_at_first(rb_econv_t *ec, const char *decorator_name)
"Decorate"s a converter.
Definition: transcode.c:1911
VALUE rb_str_encode(VALUE str, VALUE to, int ecflags, VALUE ecopts)
Converts the contents of the passed string from its encoding to the passed one.
Definition: transcode.c:2842
VALUE rb_econv_make_exception(rb_econv_t *ec)
This function makes sense right after rb_econv_convert() returns.
Definition: transcode.c:4198
void rb_econv_check_error(rb_econv_t *ec)
This is a rb_econv_make_exception() + rb_exc_raise() combo.
Definition: transcode.c:4204
VALUE rb_econv_substr_convert(rb_econv_t *ec, VALUE src, long byteoff, long bytesize, int flags)
Identical to rb_econv_str_convert(), except it converts only a part of the passed string.
Definition: transcode.c:1874
void rb_econv_close(rb_econv_t *ec)
Destructs a converter.
Definition: transcode.c:1705
VALUE rb_econv_append(rb_econv_t *ec, const char *bytesrc, long bytesize, VALUE dst, int flags)
Converts the passed C's pointer according to the passed converter, then append the conversion result ...
Definition: transcode.c:1816
void rb_econv_putback(rb_econv_t *ec, unsigned char *p, int n)
Puts back the bytes.
Definition: transcode.c:1756
int rb_econv_set_replacement(rb_econv_t *ec, const unsigned char *str, size_t len, const char *encname)
Assigns the replacement string.
Definition: transcode.c:2201
VALUE rb_eval_string_wrap(const char *str, int *state)
Identical to rb_eval_string_protect(), except it evaluates the given string under a module binding in...
Definition: vm_eval.c:1868
VALUE rb_funcall_passing_block(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcallv_public(), except you can pass the passed block.
Definition: vm_eval.c:1165
VALUE rb_funcall(VALUE recv, ID mid, int n,...)
Calls a method.
Definition: vm_eval.c:1102
VALUE rb_funcallv_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
Identical to rb_funcallv(), except you can specify how to handle the last element of the given array.
Definition: vm_eval.c:1069
VALUE rb_funcallv(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcall(), except it takes the method arguments as a C array.
Definition: vm_eval.c:1061
VALUE rb_funcall_with_block(VALUE recv, ID mid, int argc, const VALUE *argv, VALUE procval)
Identical to rb_funcallv_public(), except you can pass a block.
Definition: vm_eval.c:1179
VALUE rb_eval_string_protect(const char *str, int *state)
Identical to rb_eval_string(), except it avoids potential global escapes.
Definition: vm_eval.c:1847
VALUE rb_call_super_kw(int argc, const VALUE *argv, int kw_splat)
Identical to rb_call_super(), except you can specify how to handle the last element of the given arra...
Definition: vm_eval.c:330
VALUE rb_funcallv_public(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcallv(), except it only takes public methods into account.
Definition: vm_eval.c:1153
VALUE rb_current_receiver(void)
This resembles ruby's self.
Definition: vm_eval.c:344
VALUE rb_funcall_passing_block_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
Identical to rb_funcallv_passing_block(), except you can specify how to handle the last element of th...
Definition: vm_eval.c:1172
VALUE rb_funcall_with_block_kw(VALUE recv, ID mid, int argc, const VALUE *argv, VALUE procval, int kw_splat)
Identical to rb_funcallv_with_block(), except you can specify how to handle the last element of the g...
Definition: vm_eval.c:1189
VALUE rb_eval_string(const char *str)
Evaluates the given string in an isolated binding.
Definition: vm_eval.c:1835
VALUE rb_call_super(int argc, const VALUE *argv)
This resembles ruby's super.
Definition: vm_eval.c:338
VALUE rb_funcallv_public_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
Identical to rb_funcallv_public(), except you can specify how to handle the last element of the given...
Definition: vm_eval.c:1159
void rb_gc_register_address(VALUE *valptr)
Inform the garbage collector that valptr points to a live Ruby object that should not be moved.
Definition: gc.c:8969
void rb_gc_unregister_address(VALUE *valptr)
Inform the garbage collector that a pointer previously passed to rb_gc_register_address() no longer p...
Definition: gc.c:8981
void rb_global_variable(VALUE *)
An alias for rb_gc_register_address().
Definition: gc.c:9004
void rb_gc_register_mark_object(VALUE object)
Inform the garbage collector that object is a live Ruby object that should not be moved.
Definition: gc.c:8948
VALUE rb_ary_rotate(VALUE ary, long rot)
Destructively rotates the passed array in-place to towards its end.
Definition: array.c:3251
VALUE rb_ary_new_from_values(long n, const VALUE *elts)
Identical to rb_ary_new_from_args(), except how objects are passed.
Definition: array.c:840
VALUE rb_ary_cmp(VALUE lhs, VALUE rhs)
Recursively compares each elements of the two arrays one-by-one using <=>.
Definition: array.c:5438
VALUE rb_ary_rassoc(VALUE alist, VALUE key)
Identical to rb_ary_assoc(), except it scans the passed array from the opposite direction.
Definition: array.c:5187
VALUE rb_ary_concat(VALUE lhs, VALUE rhs)
Destructively appends the contents of latter into the end of former.
Definition: array.c:5074
VALUE rb_ary_assoc(VALUE alist, VALUE key)
Looks up the passed key, assuming the passed array is an alist.
Definition: array.c:5157
VALUE rb_ary_reverse(VALUE ary)
Destructively reverses the passed array in-place.
Definition: array.c:3164
VALUE rb_ary_shared_with_p(VALUE lhs, VALUE rhs)
Queries if the passed two arrays share the same backend storage.
Definition: array.c:719
VALUE rb_ary_shift(VALUE ary)
Destructively deletes an element from the beginning of the passed array and returns what was deleted.
Definition: array.c:1526
VALUE rb_ary_sort(VALUE ary)
Creates a copy of the passed array, whose elements are sorted according to their <=> result.
Definition: array.c:3602
VALUE rb_ary_resurrect(VALUE ary)
I guess there is no use case of this function in extension libraries, but this is a routine identical...
Definition: array.c:2833
VALUE rb_ary_dup(VALUE ary)
Duplicates an array.
Definition: array.c:2820
VALUE rb_ary_includes(VALUE ary, VALUE elem)
Queries if the passed array has the passed entry.
Definition: array.c:5357
VALUE rb_ary_aref(int argc, const VALUE *argv, VALUE ary)
Queries element(s) of an array.
Definition: array.c:1903
VALUE rb_get_values_at(VALUE obj, long olen, int argc, const VALUE *argv, VALUE(*func)(VALUE obj, long oidx))
This was a generalisation of Array#values_at, Struct#values_at, and MatchData#values_at.
void rb_ary_free(VALUE ary)
Destroys the given array for no reason.
Definition: array.c:935
VALUE rb_ary_each(VALUE ary)
Iteratively yields each element of the passed array to the implicitly passed block if any.
Definition: array.c:2660
VALUE rb_ary_delete_at(VALUE ary, long pos)
Destructively removes an element which resides at the specific index of the passed array.
Definition: array.c:4160
VALUE rb_ary_unshift(VALUE ary, VALUE elem)
Destructively prepends the passed item at the beginning of the passed array.
Definition: array.c:1744
VALUE rb_ary_plus(VALUE lhs, VALUE rhs)
Creates a new array, concatenating the former to the latter.
Definition: array.c:5014
VALUE rb_ary_cat(VALUE ary, const VALUE *train, long len)
Destructively appends multiple elements at the end of the array.
Definition: array.c:1422
void rb_ary_modify(VALUE ary)
Declares that the array is about to be modified.
Definition: array.c:637
VALUE rb_ary_replace(VALUE copy, VALUE orig)
Replaces the contents of the former object with the contents of the latter.
Definition: array.c:4664
VALUE rb_check_array_type(VALUE obj)
Try converting an object to its array representation using its to_ary method, if any.
Definition: array.c:1061
VALUE rb_ary_to_ary(VALUE obj)
Force converts an object to an array.
Definition: array.c:2252
VALUE rb_ary_new(void)
Allocates a new, empty array.
Definition: array.c:801
VALUE rb_ary_new_capa(long capa)
Identical to rb_ary_new(), except it additionally specifies how many rooms of objects it should alloc...
Definition: array.c:795
VALUE rb_ary_resize(VALUE ary, long len)
Expands or shrinks the passed array to the passed length.
Definition: array.c:2346
VALUE rb_ary_pop(VALUE ary)
Destructively deletes an element from the end of the passed array and returns what was deleted.
Definition: array.c:1460
VALUE rb_ary_tmp_new(long capa)
Allocates a "temporary" array.
Definition: array.c:917
VALUE rb_ary_clear(VALUE ary)
Destructively removes everything form an array.
Definition: array.c:4720
VALUE rb_ary_subseq(VALUE ary, long beg, long len)
Obtains a part of the passed array.
Definition: array.c:1790
VALUE rb_ary_push(VALUE ary, VALUE elem)
Special case of rb_ary_cat() that it adds only one element.
Definition: array.c:1409
VALUE rb_ary_freeze(VALUE obj)
Just another name of rb_obj_freeze.
Definition: array.c:706
VALUE rb_ary_to_s(VALUE ary)
Converts an array into a human-readable string.
Definition: array.c:3054
VALUE rb_ary_new_from_args(long n,...)
Constructs an array from the passed objects.
Definition: array.c:807
VALUE rb_ary_entry(VALUE ary, long off)
Queries an element of an array.
Definition: array.c:1762
VALUE rb_ary_sort_bang(VALUE ary)
Destructively sorts the passed array in-place, according to each elements' <=> result.
Definition: array.c:3499
VALUE rb_assoc_new(VALUE car, VALUE cdr)
Identical to rb_ary_new_from_values(), except it expects exactly two parameters.
Definition: array.c:1048
void rb_mem_clear(VALUE *buf, long len)
Fills the memory region with a series of RUBY_Qnil.
Definition: array.c:289
VALUE rb_ary_delete(VALUE ary, VALUE elem)
Destructively removes elements from the passed array, so that there would be no elements inside that ...
Definition: array.c:4106
VALUE rb_ary_join(VALUE ary, VALUE sep)
Recursively stringises the elements of the passed array, flattens that result, then joins the sequenc...
Definition: array.c:2934
void rb_ary_store(VALUE ary, long key, VALUE val)
Destructively stores the passed value to the passed array's passed index.
Definition: array.c:1245
int rb_integer_pack(VALUE val, void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
Exports an integer into a buffer.
Definition: bignum.c:3577
VALUE rb_big_lshift(VALUE x, VALUE y)
Performs shift left.
Definition: bignum.c:6636
VALUE rb_big_and(VALUE x, VALUE y)
Performs bitwise and of the passed two objects.
Definition: bignum.c:6375
VALUE rb_big_or(VALUE x, VALUE y)
Performs bitwise or of the passed two objects.
Definition: bignum.c:6494
VALUE rb_big_minus(VALUE x, VALUE y)
Performs subtraction of the passed two objects.
Definition: bignum.c:5868
VALUE rb_big_modulo(VALUE x, VALUE y)
Performs modulo of the passed two objects.
Definition: bignum.c:6118
VALUE rb_big_new(size_t len, int sign)
Allocates a bignum object.
Definition: bignum.c:3043
VALUE rb_big_pow(VALUE x, VALUE y)
Raises x to the powerof y.
Definition: bignum.c:6259
int rb_bigzero_p(VALUE x)
Queries if the passed bignum instance is a "bigzro".
Definition: bignum.c:2947
VALUE rb_big_plus(VALUE x, VALUE y)
Performs addition of the passed two objects.
Definition: bignum.c:5839
VALUE rb_str_to_inum(VALUE str, int base, int badcheck)
Identical to rb_cstr2inum(), except it takes Ruby's strings instead of C's.
Definition: bignum.c:4298
VALUE rb_big_clone(VALUE num)
Duplicates the given bignum.
Definition: bignum.c:3049
size_t rb_absint_size(VALUE val, int *nlz_bits_ret)
Calculates the number of bytes needed to represent the absolute value of the passed integer.
Definition: bignum.c:3276
size_t rb_absint_numwords(VALUE val, size_t word_numbits, size_t *nlz_bits_ret)
Calculates the number of words needed represent the absolute value of the passed integer.
Definition: bignum.c:3411
int rb_absint_singlebit_p(VALUE val)
Tests abs(val) consists only of a bit or not.
Definition: bignum.c:3476
VALUE rb_integer_unpack(const void *words, size_t numwords, size_t wordsize, size_t nails, int flags)
Import an integer from a buffer.
Definition: bignum.c:3663
unsigned long rb_big2ulong(VALUE x)
Converts a bignum into C's unsigned long.
Definition: bignum.c:5148
VALUE rb_big_idiv(VALUE x, VALUE y)
Performs "integer division".
Definition: bignum.c:6112
void rb_big_2comp(VALUE num)
Destructively modify the passed bignum into 2's complement representation.
Definition: bignum.c:3078
VALUE rb_big2str(VALUE x, int base)
Generates a place-value representation of the passed integer.
Definition: bignum.c:5114
VALUE rb_big_cmp(VALUE lhs, VALUE rhs)
Compares the passed two bignums.
Definition: bignum.c:5436
VALUE rb_str2inum(VALUE str, int base)
Identical to rb_str_to_inum(), except the second argument controls the base and badcheck at once.
Definition: bignum.c:4574
VALUE rb_dbl2big(double d)
Converts a C's double into a bignum.
Definition: bignum.c:5272
VALUE rb_big_mul(VALUE x, VALUE y)
Performs multiplication of the passed two objects.
Definition: bignum.c:5948
VALUE rb_big_eql(VALUE lhs, VALUE rhs)
Equality, in terms of eql?.
Definition: bignum.c:5560
VALUE rb_cstr2inum(const char *str, int base)
Identical to rb_cstr_to_inum(), except the second argument controls the base and badcheck at once.
Definition: bignum.c:4568
int rb_uv_to_utf8(char buf[6], unsigned long uv)
Encodes a Unicode codepoint into its UTF-8 representation.
Definition: pack.c:1637
VALUE rb_big_unpack(unsigned long *buf, long num_longs)
Constructs a (possibly very big) bignum from a series of integers.
Definition: bignum.c:3252
VALUE rb_big_divmod(VALUE x, VALUE y)
Performs "divmod" operation.
Definition: bignum.c:6150
VALUE rb_big_xor(VALUE x, VALUE y)
Performs exclusive or of the passed two objects.
Definition: bignum.c:6588
VALUE rb_big_div(VALUE x, VALUE y)
Performs division of the passed two objects.
Definition: bignum.c:6106
VALUE rb_big_norm(VALUE x)
Normalises the passed bignum.
Definition: bignum.c:3181
VALUE rb_cstr_to_inum(const char *str, int base, int badcheck)
Parses C's string to convert into a Ruby's integer.
Definition: bignum.c:4040
void rb_big_pack(VALUE val, unsigned long *buf, long num_longs)
Converts a bignum into a series of its parts.
Definition: bignum.c:3244
VALUE rb_big_rshift(VALUE x, VALUE y)
Performs shift right.
Definition: bignum.c:6666
double rb_big2dbl(VALUE x)
Converts a bignum into C's double.
Definition: bignum.c:5333
long rb_big2long(VALUE x)
Converts a bignum into C's long.
Definition: bignum.c:5163
void rb_big_resize(VALUE big, size_t len)
Destructively resizes the backend storage of the passed bignum.
Definition: bignum.c:3017
VALUE rb_big_eq(VALUE lhs, VALUE rhs)
Equality, in terms of ==.
Definition: bignum.c:5541
void rb_undef(VALUE mod, ID mid)
Inserts a method entry that hides previous method definition of the given name.
Definition: vm_method.c:1751
int rb_cmpint(VALUE val, VALUE a, VALUE b)
Canonicalises the passed val, which is the return value of a <=> b, into C's {-1, 0,...
Definition: bignum.c:2953
void rb_cmperr(VALUE a, VALUE b)
Raises "comparison failed" error.
Definition: compar.c:28
VALUE rb_complex_uminus(VALUE z)
Performs negation of the passed object.
Definition: complex.c:759
VALUE rb_complex_div(VALUE x, VALUE y)
Performs division of the passed two objects.
Definition: complex.c:949
VALUE rb_complex_new(VALUE real, VALUE imag)
Constructs a Complex, by first multiplying the imaginary part with 1i then adds it to the real part.
Definition: complex.c:1529
VALUE rb_complex_plus(VALUE x, VALUE y)
Performs addition of the passed two objects.
Definition: complex.c:779
VALUE rb_complex_new_polar(VALUE abs, VALUE arg)
Constructs a Complex using polar representations.
Definition: complex.c:1535
VALUE rb_complex_arg(VALUE z)
Queries the argument (or the angle) of the passed object.
Definition: complex.c:1209
VALUE rb_complex_raw(VALUE real, VALUE imag)
Identical to rb_complex_new(), except it assumes both arguments are not instances of rb_cComplex.
Definition: complex.c:1523
VALUE rb_dbl_complex_new(double real, double imag)
Identical to rb_complex_new(), except it takes the arguments as C's double instead of Ruby's object.
Definition: complex.c:1556
VALUE rb_complex_abs(VALUE z)
Queries the absolute (or the magnitude) of the passed object.
Definition: complex.c:1162
VALUE rb_complex_real(VALUE z)
Queries the real part of the passed Complex.
Definition: complex.c:727
VALUE rb_complex_mul(VALUE x, VALUE y)
Performs multiplication of the passed two objects.
Definition: complex.c:873
VALUE rb_complex_conjugate(VALUE z)
Performs complex conjugation of the passed object.
Definition: complex.c:1255
VALUE rb_Complex(VALUE real, VALUE imag)
Converts various values into a Complex.
Definition: complex.c:1547
VALUE rb_complex_minus(VALUE x, VALUE y)
Performs subtraction of the passed two objects.
Definition: complex.c:813
VALUE rb_complex_pow(VALUE base, VALUE exp)
Performs exponentiation of the passed two objects.
Definition: complex.c:986
VALUE rb_complex_imag(VALUE z)
Queries the imaginary part of the passed Complex.
Definition: complex.c:744
VALUE rb_fiber_current(void)
Queries the fiber which is calling this function.
Definition: cont.c:2254
VALUE rb_fiber_yield_kw(int argc, const VALUE *argv, int kw_splat)
Identical to rb_fiber_yield(), except you can specify how to handle the last element of the given arr...
Definition: cont.c:2503
VALUE rb_fiber_resume_kw(VALUE fiber, int argc, const VALUE *argv, int kw_splat)
Identical to rb_fiber_resume(), except you can specify how to handle the last element of the given ar...
Definition: cont.c:2491
VALUE rb_fiber_alive_p(VALUE fiber)
Queries the liveness of the passed fiber.
Definition: cont.c:2531
VALUE rb_fiber_new(rb_block_call_func_t func, VALUE callback_obj)
Creates a Fiber instance from a C-backended block.
Definition: cont.c:1969
VALUE rb_obj_is_fiber(VALUE obj)
Queries if an object is a fiber.
Definition: cont.c:1135
VALUE rb_fiber_yield(int argc, const VALUE *argv)
Yields the control back to the point where the current fiber was resumed.
Definition: cont.c:2509
VALUE rb_fiber_resume(VALUE fiber, int argc, const VALUE *argv)
Resumes the execution of the passed fiber, either from the point at which the last rb_fiber_yield() w...
Definition: cont.c:2497
VALUE rb_dir_getwd(void)
Queries the path of the current working directory of the current process.
Definition: dir.c:1124
VALUE rb_enum_values_pack(int argc, const VALUE *argv)
Basically identical to rb_ary_new_form_values(), except it returns something different when argc < 2.
Definition: enum.c:53
VALUE rb_enumeratorize_with_size(VALUE recv, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *func)
Identical to rb_enumeratorize(), except you can additionally specify the size function of return valu...
Definition: enumerator.c:536
VALUE rb_enumeratorize(VALUE recv, VALUE meth, int argc, const VALUE *argv)
Constructs an enumerator.
Definition: enumerator.c:511
VALUE rb_enumeratorize_with_size_kw(VALUE recv, VALUE meth, int argc, const VALUE *argv, rb_enumerator_size_func *func, int kw_splat)
Identical to rb_enumeratorize_with_func(), except you can specify how to handle the last element of t...
Definition: enumerator.c:520
int rb_arithmetic_sequence_extract(VALUE as, rb_arithmetic_sequence_components_t *buf)
Extracts components of the passed arithmetic sequence.
Definition: enumerator.c:3429
VALUE rb_enumerator_size_func(VALUE recv, VALUE argv, VALUE eobj)
This is the type of functions that rb_enumeratorize_with_size() expects.
Definition: enumerator.h:45
static void rb_check_frozen_inline(VALUE obj)
Just another name of rb_check_frozen.
Definition: error.h:256
static int rb_check_arity(int argc, int min, int max)
Ensures that the passed integer is in the passed range.
Definition: error.h:280
ID rb_frame_callee(void)
Identical to rb_frame_this_func(), except it returns the named used to call the method.
Definition: eval.c:1042
ID rb_frame_this_func(void)
Queries the name of the Ruby level method that is calling this function.
Definition: eval.c:1036
void rb_obj_call_init(VALUE obj, int argc, const VALUE *argv)
Calls initialize method of the passed object with the passed arguments.
Definition: eval.c:1663
VALUE rb_f_abort(int argc, const VALUE *argv)
This is similar to rb_f_exit().
Definition: process.c:4581
void rb_interrupt(void)
Raises an instance of rb_eInterrupt.
Definition: eval.c:690
VALUE rb_f_exit(int argc, const VALUE *argv)
Identical to rb_exit(), except how arguments are passed.
Definition: process.c:4516
VALUE rb_make_exception(int argc, const VALUE *argv)
Constructs an exception object from the list of arguments, in a manner similar to Ruby's raise.
Definition: eval.c:818
void rb_jump_tag(int state)
This function is to re-throw global escapes.
Definition: eval.c:842
void rb_obj_call_init_kw(VALUE, int, const VALUE *, int)
Identical to rb_obj_call_init(), except you can specify how to handle the last element of the given a...
Definition: eval.c:1669
void rb_set_end_proc(void(*func)(VALUE arg), VALUE arg)
Registers a function that shall run on process exit.
VALUE rb_find_file(VALUE path)
Identical to rb_find_file_ext(), except it takes a feature name and is extension at once,...
Definition: file.c:6467
VALUE rb_file_s_absolute_path(int argc, const VALUE *argv)
Identical to rb_file_absolute_path(), except how arguments are passed.
Definition: file.c:4141
VALUE rb_str_encode_ospath(VALUE path)
Converts a string into an "OS Path" encoding, if any.
Definition: file.c:251
int rb_is_absolute_path(const char *path)
Queries if the given path is an absolute path.
Definition: file.c:6232
int rb_find_file_ext(VALUE *feature, const char *const *exts)
Resolves a feature's path.
Definition: file.c:6408
VALUE rb_file_s_expand_path(int argc, const VALUE *argv)
Identical to rb_file_expand_path(), except how arguments are passed.
Definition: file.c:4093
VALUE rb_file_directory_p(VALUE _, VALUE path)
Queries if the given path is either a directory, or a symlink that (potentially recursively) points t...
Definition: file.c:1609
VALUE rb_file_expand_path(VALUE fname, VALUE dname)
Identical to rb_file_absolute_path(), except it additionally understands ~.
Definition: file.c:4080
VALUE rb_file_dirname(VALUE fname)
Strips a file path's last component (and trailing separators if any).
Definition: file.c:4747
VALUE rb_file_absolute_path(VALUE fname, VALUE dname)
Maps a relative path to its absolute representation.
Definition: file.c:4134
void rb_gc_mark(VALUE obj)
Marks an object.
Definition: gc.c:6900
void rb_mark_tbl_no_pin(struct st_table *tbl)
Identical to rb_mark_tbl(), except it marks objects using rb_gc_mark_movable().
Definition: gc.c:6687
void rb_memerror(void)
Triggers out-of-memory error.
Definition: gc.c:11610
size_t rb_gc_stat(VALUE key_or_buf)
Obtains various GC related profiles.
Definition: gc.c:10986
void rb_gc_mark_movable(VALUE obj)
Maybe this is the only function provided for C extensions to control the pinning of objects,...
Definition: gc.c:6894
VALUE rb_gc_disable(void)
Disables GC.
Definition: gc.c:11189
VALUE rb_gc_start(void)
Identical to rb_gc(), except the return value.
Definition: gc.c:10620
VALUE rb_gc_latest_gc_info(VALUE key_or_buf)
Obtains various info regarding the most recent GC run.
Definition: gc.c:10764
void rb_mark_tbl(struct st_table *tbl)
Identical to rb_mark_hash(), except it marks only values of the table and leave their associated keys...
Definition: gc.c:6681
VALUE rb_gc_enable(void)
(Re-) enables GC.
Definition: gc.c:11152
void rb_mark_hash(struct st_table *tbl)
Marks keys and values associated inside of the given table.
Definition: gc.c:6486
VALUE rb_undefine_finalizer(VALUE obj)
Modifies the object so that it has no finalisers at all.
Definition: gc.c:4049
int rb_during_gc(void)
Queries if the GC is busy.
Definition: gc.c:10635
void rb_gc_mark_maybe(VALUE obj)
Identical to rb_gc_mark(), except it allows the passed value be a non-object.
Definition: gc.c:6719
VALUE rb_gc_location(VALUE obj)
Finds a new "location" of an object.
Definition: gc.c:10035
void rb_gc_mark_locations(const VALUE *start, const VALUE *end)
Marks objects between the two pointers.
Definition: gc.c:6316
void rb_gc(void)
Triggers a GC process.
Definition: gc.c:10627
void rb_gc_force_recycle(VALUE obj)
Asserts that the passed object is no longer needed.
Definition: gc.c:8938
void rb_gc_update_tbl_refs(st_table *ptr)
Updates references inside of tables.
Definition: gc.c:9879
void rb_mark_set(struct st_table *tbl)
Identical to rb_mark_hash(), except it marks only keys of the table and leave their associated values...
Definition: gc.c:6422
VALUE rb_define_finalizer(VALUE obj, VALUE block)
Assigns a finaliser for an object.
Definition: gc.c:4201
void rb_gc_copy_finalizer(VALUE dst, VALUE src)
Copy&paste an object's finaliser to another.
Definition: gc.c:4209
void rb_gc_adjust_memory_usage(ssize_t diff)
Informs that there are external memory usages.
Definition: gc.c:12381
size_t rb_gc_count(void)
Identical to rb_gc_stat(), with "count" parameter.
Definition: gc.c:10659
VALUE rb_hash_size(VALUE hash)
Identical to RHASH_SIZE(), except it returns the size in Ruby's integer instead of C's.
Definition: hash.c:2980
void rb_hash_bulk_insert(long argc, const VALUE *argv, VALUE hash)
Inserts a list of key-value pairs into a hash table at once.
Definition: hash.c:4758
void rb_hash_foreach(VALUE hash, int(*func)(VALUE key, VALUE val, VALUE arg), VALUE arg)
Iterates over a hash.
VALUE rb_check_hash_type(VALUE obj)
Try converting an object to its hash representation using its to_hash method, if any.
Definition: hash.c:1902
void rb_st_foreach_safe(struct st_table *st, st_foreach_callback_func *func, st_data_t arg)
Identical to rb_st_foreach(), except it raises exceptions when the callback function tampers the tabl...
VALUE rb_hash_lookup2(VALUE hash, VALUE key, VALUE def)
Identical to rb_hash_lookup(), except you can specify what to return on misshits.
Definition: hash.c:2101
int rb_path_check(const char *path)
This function is mysterious.
Definition: file.c:6309
VALUE rb_hash_freeze(VALUE obj)
Just another name of rb_obj_freeze.
Definition: hash.c:87
VALUE rb_hash_update_func(VALUE newkey, VALUE oldkey, VALUE value)
Type of callback functions to pass to rb_hash_update_by().
Definition: hash.h:269
VALUE rb_hash_delete(VALUE hash, VALUE key)
Deletes the passed key from the passed hash table, if any.
Definition: hash.c:2368
VALUE rb_hash_fetch(VALUE hash, VALUE key)
Identical to rb_hash_lookup(), except it yields the (implicitly) passed block instead of returning RU...
Definition: hash.c:2179
VALUE rb_hash_delete_if(VALUE hash)
Deletes each entry for which the block returns a truthy value.
Definition: hash.c:2530
VALUE rb_hash_update_by(VALUE hash1, VALUE hash2, rb_hash_update_func *func)
Destructively merges two hash tables into one.
Definition: hash.c:4015
VALUE rb_hash_aref(VALUE hash, VALUE key)
Queries the given key in the given hash table.
Definition: hash.c:2088
VALUE rb_hash_aset(VALUE hash, VALUE key, VALUE val)
Inserts or replaces ("upsert"s) the objects into the given hash table.
Definition: hash.c:2908
VALUE rb_env_clear(void)
Destructively removes every environment variables of the running process.
Definition: hash.c:5886
VALUE rb_hash_lookup(VALUE hash, VALUE key)
Identical to rb_hash_aref(), except it always returns RUBY_Qnil for misshits.
Definition: hash.c:2114
VALUE rb_hash_dup(VALUE hash)
Duplicates a hash.
Definition: hash.c:1591
VALUE rb_hash(VALUE obj)
Calculates a message authentication code of the passed object.
Definition: hash.c:227
VALUE rb_hash_clear(VALUE hash)
Swipes everything out of the passed hash table.
Definition: hash.c:2834
VALUE rb_hash_new(void)
Creates a new, empty hash object.
Definition: hash.c:1529
VALUE rb_io_printf(int argc, const VALUE *argv, VALUE io)
This is a rb_f_sprintf() + rb_io_write() combo.
Definition: io.c:8246
VALUE rb_io_gets(VALUE io)
Reads a "line" from the given IO.
Definition: io.c:3998
int rb_cloexec_pipe(int fildes[2])
Opens a pipe with closing on exec.
Definition: io.c:414
VALUE rb_rs
The record separator character for inputs, or the $/.
Definition: io.c:203
VALUE rb_io_print(int argc, const VALUE *argv, VALUE io)
Iterates over the passed array to apply rb_io_write() individually.
Definition: io.c:8371
VALUE rb_io_addstr(VALUE io, VALUE str)
Identical to rb_io_write(), except it always returns the passed IO.
Definition: io.c:2135
void rb_write_error(const char *str)
Writes the given error message to somewhere applicable.
Definition: io.c:8787
VALUE rb_io_ungetbyte(VALUE io, VALUE b)
Identical to rb_io_ungetc(), except it doesn't take the encoding of the passed IO into account.
Definition: io.c:4855
VALUE rb_io_getbyte(VALUE io)
Reads a byte from the given IO.
Definition: io.c:4763
VALUE rb_io_puts(int argc, const VALUE *argv, VALUE io)
Iterates over the passed array to apply rb_io_write() individually.
Definition: io.c:8601
int rb_cloexec_dup2(int oldfd, int newfd)
Identical to rb_cloexec_dup(), except you can specify the destination file descriptor.
Definition: io.c:361
VALUE rb_io_fdopen(int fd, int flags, const char *path)
Creates an IO instance whose backend is the given file descriptor.
Definition: io.c:8894
void rb_update_max_fd(int fd)
Informs the interpreter that the passed fd can be the max.
Definition: io.c:235
VALUE rb_io_write(VALUE io, VALUE str)
Writes the given string to the given IO.
Definition: io.c:2087
int rb_cloexec_open(const char *pathname, int flags, mode_t mode)
Opens a file that closes on exec.
Definition: io.c:315
VALUE rb_fs
The field separator character for inputs, or the $;.
Definition: string.c:552
VALUE rb_output_rs
The record separator character for outputs, or the $\.
Definition: io.c:204
VALUE rb_io_eof(VALUE io)
Queries if the passed IO is at the end of file.
Definition: io.c:2486
void rb_write_error2(const char *str, long len)
Identical to rb_write_error(), except it additionally takes the message's length.
Definition: io.c:8767
void rb_close_before_exec(int lowfd, int maxhint, VALUE noclose_fds)
Closes everything.
int rb_reserved_fd_p(int fd)
Queries if the given FD is reserved or not.
void rb_fd_fix_cloexec(int fd)
Sets or clears the close-on-exec flag of the passed file descriptor to the desired state.
Definition: io.c:285
VALUE rb_io_flush(VALUE io)
Flushes any buffered data within the passed IO to the underlying operating system.
Definition: io.c:2191
VALUE rb_io_ascii8bit_binmode(VALUE io)
Forces no conversions be applied to the passed IO.
Definition: io.c:5984
VALUE rb_io_binmode(VALUE io)
Sets the binmode.
Definition: io.c:5938
VALUE rb_io_ungetc(VALUE io, VALUE c)
"Unget"s a string.
Definition: io.c:4918
int rb_pipe(int *pipes)
This is an rb_cloexec_pipe() + rb_update_max_fd() combo.
Definition: io.c:6989
VALUE rb_gets(void)
Much like rb_io_gets(), but it reads from the mysterious ARGF object.
Definition: io.c:9724
int rb_cloexec_fcntl_dupfd(int fd, int minfd)
Duplicates a file descriptor with closing on exec.
Definition: io.c:448
VALUE rb_output_fs
The field separator character for outputs, or the $,.
Definition: io.c:202
VALUE rb_file_open_str(VALUE fname, const char *fmode)
Identical to rb_file_open(), except it takes the pathname as a Ruby's string instead of C's.
Definition: io.c:6872
int rb_cloexec_dup(int oldfd)
Identical to rb_cloexec_fcntl_dupfd(), except it implies minfd is 3.
Definition: io.c:354
VALUE rb_file_open(const char *fname, const char *fmode)
Opens a file located at the given path.
Definition: io.c:6879
VALUE rb_io_close(VALUE io)
Closes the IO.
Definition: io.c:5439
VALUE rb_default_rs
This is the default value of rb_rs, i.e.
Definition: io.c:205
void rb_provide(const char *feature)
Declares that the given feature is already provided by someone else.
Definition: load.c:671
VALUE rb_f_require(VALUE self, VALUE feature)
Identical to rb_require_string(), except it ignores the first argument for no reason.
Definition: load.c:939
VALUE rb_require_string(VALUE feature)
Finds and loads the given feature, if absent.
Definition: load.c:1257
int rb_feature_provided(const char *feature, const char **loading)
Identical to rb_provided(), except it additionally returns the "canonical" name of the loaded feature...
Definition: load.c:643
void rb_load_protect(VALUE path, int wrap, int *state)
Identical to rb_load(), except it avoids potential global escapes.
Definition: load.c:768
int rb_provided(const char *feature)
Queries if the given feature has already been loaded into the execution context.
Definition: load.c:610
void rb_load(VALUE path, int wrap)
Loads and executes the Ruby program in the given file.
Definition: load.c:760
void rb_num_zerodiv(void)
Just always raises an exception.
Definition: numeric.c:200
VALUE rb_num2fix(VALUE val)
Converts a numeric value into a Fixnum.
Definition: numeric.c:3382
VALUE rb_fix2str(VALUE val, int base)
Generates a place-value representation of the given Fixnum, with given radix.
Definition: numeric.c:3853
VALUE rb_int_positive_pow(long x, unsigned long y)
Raises the passed x to the power of y.
Definition: numeric.c:4492
VALUE rb_dbl_cmp(double lhs, double rhs)
Compares two doubles.
Definition: numeric.c:1661
VALUE rb_num_coerce_bit(VALUE lhs, VALUE rhs, ID op)
This one is optimised for bitwise operations, but the API is identical to rb_num_coerce_bin().
Definition: numeric.c:4923
VALUE rb_num_coerce_relop(VALUE lhs, VALUE rhs, ID op)
Identical to rb_num_coerce_cmp(), except for return values.
Definition: numeric.c:493
VALUE rb_num_coerce_cmp(VALUE lhs, VALUE rhs, ID op)
Identical to rb_num_coerce_bin(), except for return values.
Definition: numeric.c:478
VALUE rb_num_coerce_bin(VALUE lhs, VALUE rhs, ID op)
Coerced binary operation.
Definition: numeric.c:471
VALUE rb_obj_id(VALUE obj)
Finds or creates an integer primary key of the given object.
Definition: gc.c:4712
VALUE rb_memory_id(VALUE obj)
Identical to rb_obj_id(), except it hesitates from allocating a new instance of rb_cInteger.
Definition: gc.c:4679
VALUE rb_backref_get(void)
Queries the last match, or Regexp.last_match, or the $~.
Definition: vm.c:1583
VALUE rb_sym_all_symbols(void)
Collects every single bits of symbols that have ever interned in the entire history of the current pr...
Definition: symbol.c:1002
int rb_is_global_id(ID id)
Classifies the given ID, then sees if it is a global variable.
Definition: symbol.c:1035
void rb_lastline_set(VALUE str)
Updates $_.
Definition: vm.c:1601
int rb_is_instance_id(ID id)
Classifies the given ID, then sees if it is an instance variable.
Definition: symbol.c:1041
int rb_is_const_id(ID id)
Classifies the given ID, then sees if it is a constant.
Definition: symbol.c:1023
int rb_is_junk_id(ID)
Classifies the given ID, then sees if it is a junk ID.
Definition: symbol.c:1059
int rb_symname_p(const char *str)
Sees if the passed C string constructs a valid syntactic symbol.
Definition: symbol.c:197
VALUE rb_lastline_get(void)
Queries the last line, or the $_.
Definition: vm.c:1595
ID rb_id_attrset(ID id)
Calculates an ID of attribute writer.
Definition: symbol.c:113
int rb_is_class_id(ID id)
Classifies the given ID, then sees if it is a class variable.
Definition: symbol.c:1029
int rb_is_attrset_id(ID id)
Classifies the given ID, then sees if it is an attribute writer.
Definition: symbol.c:1047
int rb_is_local_id(ID id)
Classifies the given ID, then sees if it is a local variable.
Definition: symbol.c:1053
void rb_backref_set(VALUE md)
Updates $~.
Definition: vm.c:1589
VALUE rb_method_call_with_block(int argc, const VALUE *argv, VALUE recv, VALUE proc)
Identical to rb_proc_call(), except you can additionally pass a proc as a block.
Definition: proc.c:2491
int rb_obj_method_arity(VALUE obj, ID mid)
Identical to rb_mod_method_arity(), except it searches for singleton methods rather than instance met...
Definition: proc.c:2857
VALUE rb_proc_call(VALUE recv, VALUE args)
Evaluates the passed proc with the passed arguments.
Definition: proc.c:1000
VALUE rb_proc_call_with_block_kw(VALUE recv, int argc, const VALUE *argv, VALUE proc, int kw_splat)
Identical to rb_proc_call_with_block(), except you can specify how to handle the last element of the ...
Definition: proc.c:1012
VALUE rb_method_call_kw(int argc, const VALUE *argv, VALUE recv, int kw_splat)
Identical to rb_method_call(), except you can specify how to handle the last element of the given arr...
Definition: proc.c:2448
VALUE rb_obj_method(VALUE recv, VALUE mid)
Creates a method object.
Definition: proc.c:2040
VALUE rb_proc_lambda_p(VALUE recv)
Queries if the given object is a lambda.
Definition: proc.c:290
VALUE rb_block_proc(void)
Constructs a Proc object from implicitly passed components.
Definition: proc.c:845
VALUE rb_proc_call_with_block(VALUE recv, int argc, const VALUE *argv, VALUE proc)
Identical to rb_proc_call(), except you can additionally pass another proc object,...
Definition: proc.c:1024
VALUE rb_protect(VALUE(*func)(VALUE args), VALUE args, int *state)
Protects a function call from potential global escapes from the function.
int rb_mod_method_arity(VALUE mod, ID mid)
Queries the number of mandatory arguments of the method defined in the given module.
Definition: proc.c:2849
VALUE rb_proc_new(rb_block_call_func_t func, VALUE callback_arg)
This is an rb_iterate() + rb_block_proc() combo.
Definition: proc.c:3285
VALUE rb_method_call_with_block_kw(int argc, const VALUE *argv, VALUE recv, VALUE proc, int kw_splat)
Identical to rb_method_call_with_block(), except you can specify how to handle the last element of th...
Definition: proc.c:2478
VALUE rb_obj_is_method(VALUE recv)
Queries if the given object is a method.
Definition: proc.c:1632
VALUE rb_block_lambda(void)
Identical to rb_proc_new(), except it returns a lambda.
Definition: proc.c:864
VALUE rb_proc_call_kw(VALUE recv, VALUE args, int kw_splat)
Identical to rb_proc_call(), except you can specify how to handle the last element of the given array...
Definition: proc.c:985
VALUE rb_binding_new(void)
Snapshots the current execution context and turn it into an instance of rb_cBinding.
Definition: proc.c:382
int rb_proc_arity(VALUE recv)
Queries the number of mandatory arguments of the given Proc.
Definition: proc.c:1131
VALUE rb_method_call(int argc, const VALUE *argv, VALUE recv)
Evaluates the passed method with the passed arguments.
Definition: proc.c:2455
VALUE rb_obj_is_proc(VALUE recv)
Queries if the given object is a proc.
Definition: proc.c:172
int rb_proc_exec(const char *cmd)
Executes a shell command.
Definition: process.c:1906
VALUE rb_proc_times(VALUE _)
Gathers info about resources consumed by the current process.
VALUE rb_last_status_get(void)
Queries the "last status", or the $?.
Definition: process.c:616
rb_pid_t rb_waitpid(rb_pid_t pid, int *status, int flags)
Waits for a process, with releasing GVL.
Definition: process.c:1458
rb_pid_t rb_spawn_err(int argc, const VALUE *argv, char *errbuf, size_t buflen)
Identical to rb_spawn(), except you can additionally know the detailed situation in case of abnormal ...
Definition: process.c:4757
void rb_syswait(rb_pid_t pid)
This is a shorthand of rb_waitpid without status and flags.
Definition: process.c:4626
VALUE rb_f_exec(int argc, const VALUE *argv)
Replaces the current process by running the given external command.
Definition: process.c:3123
rb_pid_t rb_spawn(int argc, const VALUE *argv)
Identical to rb_f_exec(), except it spawns a child process instead of replacing the current one.
Definition: process.c:4763
void rb_last_status_set(int status, rb_pid_t pid)
Sets the "last status", or the $?.
Definition: process.c:680
VALUE rb_detach_process(rb_pid_t pid)
"Detaches" a subprocess.
Definition: process.c:1661
unsigned long rb_genrand_ulong_limited(unsigned long i)
Generates a random number whose upper limit is i.
Definition: random.c:1044
double rb_random_real(VALUE rnd)
Identical to rb_genrand_real(), except it generates using the passed RNG.
Definition: random.c:1116
unsigned int rb_random_int32(VALUE rnd)
Identical to rb_genrand_int32(), except it generates using the passed RNG.
Definition: random.c:1073
void rb_reset_random_seed(void)
Resets the RNG behind rb_genrand_int32()/rb_genrand_real().
Definition: random.c:1755
VALUE rb_random_bytes(VALUE rnd, long n)
Generates a String of random bytes.
Definition: random.c:1274
double rb_genrand_real(void)
Generates a double random number.
Definition: random.c:199
unsigned long rb_random_ulong_limited(VALUE rnd, unsigned long limit)
Identical to rb_genrand_ulong_limited(), except it generates using the passed RNG.
Definition: random.c:1176
unsigned int rb_genrand_int32(void)
Generates a 32 bit random number.
Definition: random.c:192
int rb_range_values(VALUE range, VALUE *begp, VALUE *endp, int *exclp)
Deconstructs a range into its components.
Definition: range.c:1490
VALUE rb_range_new(VALUE beg, VALUE end, int excl)
Creates a new Range.
Definition: range.c:67
VALUE rb_range_beg_len(VALUE range, long *begp, long *lenp, long len, int err)
Deconstructs a numerical range.
Definition: range.c:1578
VALUE rb_rational_raw(VALUE num, VALUE den)
Identical to rb_rational_new(), except it skips argument validations.
Definition: rational.c:1955
VALUE rb_rational_new(VALUE num, VALUE den)
Constructs a Rational, with reduction.
Definition: rational.c:1969
VALUE rb_Rational(VALUE num, VALUE den)
Converts various values into a Rational.
Definition: rational.c:1975
VALUE rb_rational_num(VALUE rat)
Queries the numerator of the passed Rational.
Definition: rational.c:1984
VALUE rb_flt_rationalize(VALUE flt)
Identical to rb_flt_rationalize_with_prec(), except it auto-detects appropriate precision depending o...
Definition: rational.c:2254
VALUE rb_flt_rationalize_with_prec(VALUE flt, VALUE prec)
Simplified approximation of a float.
Definition: rational.c:2238
VALUE rb_rational_den(VALUE rat)
Queries the denominator of the passed Rational.
Definition: rational.c:1990
int rb_reg_backref_number(VALUE match, VALUE backref)
Queries the index of the given named capture.
Definition: re.c:1224
int rb_reg_options(VALUE re)
Queries the options of the passed regular expression.
Definition: re.c:3855
VALUE rb_reg_last_match(VALUE md)
This just returns the argument, stringified.
Definition: re.c:1876
VALUE rb_reg_match(VALUE re, VALUE str)
This is the match operator.
Definition: re.c:3418
void rb_match_busy(VALUE md)
Asserts that the given MatchData is "occupied".
Definition: re.c:1430
VALUE rb_reg_nth_match(int n, VALUE md)
Queries the nth captured substring.
Definition: re.c:1851
VALUE rb_reg_match_post(VALUE md)
The portion of the original string after the given match.
Definition: re.c:1933
VALUE rb_reg_nth_defined(int n, VALUE md)
Identical to rb_reg_nth_match(), except it just returns Boolean.
Definition: re.c:1834
VALUE rb_reg_match_pre(VALUE md)
The portion of the original string before the given match.
Definition: re.c:1900
VALUE rb_reg_new_str(VALUE src, int opts)
Identical to rb_reg_new(), except it takes the expression in Ruby's string instead of C's.
Definition: re.c:3119
VALUE rb_reg_match_last(VALUE md)
The portion of the original string that captured at the very last.
Definition: re.c:1950
VALUE rb_reg_match2(VALUE re)
Identical to rb_reg_match(), except it matches against rb_lastline_get() (or, the $_).
Definition: re.c:3473
VALUE rb_reg_new(const char *src, long len, int opts)
Creates a new Regular expression.
Definition: re.c:3173
int rb_memcicmp(const void *s1, const void *s2, long n)
Identical to st_locale_insensitive_strcasecmp(), except it is timing safe and returns something diffe...
Definition: re.c:90
void ruby_default_signal(int sig)
Pretends as if there was no custom signal handler.
Definition: signal.c:407
const char * ruby_signal_name(int signo)
Queries the name of the signal.
Definition: signal.c:316
VALUE rb_f_kill(int argc, const VALUE *argv)
Sends a signal ("kills") to processes.
Definition: signal.c:423
void rb_str_free(VALUE str)
Destroys the given string for no reason.
Definition: string.c:1532
#define rb_hash_uint(h, i)
Just another name of st_hash_uint.
Definition: string.h:942
VALUE rb_str_new_shared(VALUE str)
Identical to rb_str_new_cstr(), except it takes a Ruby's string instead of C's.
Definition: string.c:1335
VALUE rb_str_plus(VALUE lhs, VALUE rhs)
Generates a new string, concatenating the former to the latter.
Definition: string.c:2171
#define rb_hash_end(h)
Just another name of st_hash_end.
Definition: string.h:945
#define rb_hash_uint32(h, i)
Just another name of st_hash_uint32.
Definition: string.h:939
VALUE rb_utf8_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "UTF-8" encoding.
Definition: string.c:931
VALUE rb_str_append(VALUE dst, VALUE src)
Identical to rb_str_buf_append(), except it converts the right hand side before concatenating.
Definition: string.c:3259
VALUE rb_filesystem_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "filesystem" encoding.
Definition: string.c:1248
VALUE rb_utf8_str_new_cstr(const char *ptr)
Identical to rb_str_new_cstr(), except it generates a string of "UTF-8" encoding.
Definition: string.c:971
VALUE rb_sym_to_s(VALUE sym)
This is an rb_sym2str() + rb_str_dup() combo.
Definition: string.c:11426
VALUE rb_str_times(VALUE str, VALUE num)
Repetition of a string.
Definition: string.c:2243
VALUE rb_external_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "default external" encoding.
Definition: string.c:1224
VALUE rb_str_tmp_new(long len)
Allocates a "temporary" string.
Definition: string.c:1526
long rb_str_offset(VALUE str, long pos)
"Inverse" of rb_str_sublen().
Definition: string.c:2702
VALUE rb_str_succ(VALUE orig)
Searches for the "successor" of a string.
Definition: string.c:4714
int rb_str_hash_cmp(VALUE str1, VALUE str2)
Compares two strings.
Definition: string.c:3468
VALUE rb_str_subseq(VALUE str, long beg, long len)
Identical to rb_str_substr(), except the numbers are interpreted as byte offsets instead of character...
Definition: string.c:2760
VALUE rb_str_ellipsize(VALUE str, long len)
Shortens str and adds three dots, an ellipsis, if it is longer than len characters.
Definition: string.c:10719
st_index_t rb_memhash(const void *ptr, long len)
This is a universal hash function.
Definition: random.c:1720
void rb_str_shared_replace(VALUE dst, VALUE src)
Replaces the contents of the former with the latter.
Definition: string.c:1579
VALUE rb_str_new_static(const char *ptr, long len)
Identical to rb_str_new(), except it takes a C string literal.
Definition: string.c:1015
VALUE rb_str_buf_cat(VALUE, const char *, long)
Just another name of rb_str_cat.
size_t rb_str_capacity(VALUE str)
Queries the capacity of the given string.
Definition: string.c:827
VALUE rb_str_new_frozen(VALUE str)
Creates a frozen copy of the string, if necessary.
Definition: string.c:1341
VALUE rb_str_cat2(VALUE, const char *)
Just another name of rb_str_cat_cstr.
VALUE rb_str_dup(VALUE str)
Duplicates a string.
Definition: string.c:1794
void rb_str_modify(VALUE str)
Declares that the string is about to be modified.
Definition: string.c:2398
st_index_t rb_str_hash(VALUE str)
Calculates a hash value of a string.
Definition: string.c:3458
VALUE rb_str_cat(VALUE dst, const char *src, long srclen)
Destructively appends the passed contents to the string.
Definition: string.c:3102
VALUE rb_str_locktmp(VALUE str)
Obtains a "temporary lock" of the string.
long rb_str_strlen(VALUE str)
Counts the number of characters (not bytes) that are stored inside of the given string.
Definition: string.c:2109
VALUE rb_str_resurrect(VALUE str)
I guess there is no use case of this function in extension libraries, but this is a routine identical...
Definition: string.c:1800
VALUE rb_usascii_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "US ASCII" encoding.
Definition: string.c:923
VALUE rb_str_replace(VALUE dst, VALUE src)
Replaces the contents of the former object with the stringised contents of the latter.
Definition: string.c:5917
VALUE rb_usascii_str_new_cstr(const char *ptr)
Identical to rb_str_new_cstr(), except it generates a string of "US ASCII" encoding.
Definition: string.c:963
VALUE rb_str_buf_cat2(VALUE, const char *)
Just another name of rb_str_cat_cstr.
char * rb_str_subpos(VALUE str, long beg, long *len)
Identical to rb_str_substr(), except it returns a C's string instead of Ruby's.
Definition: string.c:2783
rb_gvar_setter_t rb_str_setter
This is a rb_gvar_setter_t that refutes non-string assignments.
Definition: string.h:1146
VALUE rb_filesystem_str_new_cstr(const char *ptr)
Identical to rb_filesystem_str_new(), except it assumes the passed pointer is a pointer to a C string...
Definition: string.c:1254
VALUE rb_str_buf_append(VALUE dst, VALUE src)
Identical to rb_str_cat_cstr(), except it takes Ruby's string instead of C's.
Definition: string.c:3244
long rb_str_sublen(VALUE str, long pos)
Byte offset to character offset conversion.
Definition: string.c:2749
VALUE rb_str_equal(VALUE str1, VALUE str2)
Equality of two strings.
Definition: string.c:3570
void rb_str_set_len(VALUE str, long len)
Overwrites the length of the string.
Definition: string.c:2980
st_index_t rb_hash_start(st_index_t i)
Starts a series of hashing.
Definition: random.c:1714
VALUE rb_str_inspect(VALUE str)
Generates a "readable" version of the receiver.
Definition: string.c:6602
void rb_must_asciicompat(VALUE obj)
Asserts that the given string's encoding is (Ruby's definition of) ASCII compatible.
Definition: string.c:2450
VALUE rb_str_buf_new_cstr(const char *ptr)
This is a rb_str_buf_new() + rb_str_buf_cat() combo.
Definition: string.c:1514
int rb_str_cmp(VALUE lhs, VALUE rhs)
Compares two strings, as in strcmp(3).
Definition: string.c:3524
VALUE rb_str_concat(VALUE dst, VALUE src)
Identical to rb_str_append(), except it also accepts an integer as a codepoint.
Definition: string.c:3360
int rb_str_comparable(VALUE str1, VALUE str2)
Checks if two strings are comparable each other or not.
Definition: string.c:3499
VALUE rb_str_buf_cat_ascii(VALUE dst, const char *src)
Identical to rb_str_cat_cstr(), except it additionally assumes the source string be a NUL terminated ...
Definition: string.c:3220
VALUE rb_str_freeze(VALUE str)
This is the implementation of String#freeze.
Definition: string.c:2902
void rb_str_update(VALUE dst, long beg, long len, VALUE src)
Replaces some (or all) of the contents of the given string.
Definition: string.c:5218
VALUE rb_str_new(const char *ptr, long len)
Allocates an instance of rb_cString.
Definition: string.c:917
VALUE rb_str_scrub(VALUE str, VALUE repl)
"Cleanses" the string.
Definition: string.c:10777
VALUE rb_str_dup_frozen(VALUE)
Just another name of rb_str_new_frozen.
VALUE rb_str_new_with_class(VALUE obj, const char *ptr, long len)
Identical to rb_str_new(), except it takes the class of the allocating object.
Definition: string.c:1473
VALUE rb_locale_str_new_cstr(const char *ptr)
Identical to rb_locale_str_new(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:1242
VALUE rb_check_string_type(VALUE obj)
Try converting an object to its stringised representation using its to_str method,...
Definition: string.c:2598
VALUE rb_str_substr(VALUE str, long beg, long len)
This is the implementation of two-argumented String#slice.
Definition: string.c:2870
VALUE rb_str_unlocktmp(VALUE str)
Releases a lock formerly obtained by rb_str_locktmp().
Definition: string.c:2963
VALUE rb_str_new_cstr(const char *ptr)
Identical to rb_str_new(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:951
VALUE rb_str_resize(VALUE str, long len)
Overwrites the length of the string.
Definition: string.c:2997
VALUE rb_utf8_str_new_static(const char *ptr, long len)
Identical to rb_str_new_static(), except it generates a string of "UTF-8" encoding instead of "binary...
Definition: string.c:1027
void rb_str_modify_expand(VALUE str, long capa)
Identical to rb_str_modify(), except it additionally expands the capacity of the receiver.
Definition: string.c:2406
VALUE rb_str_dump(VALUE str)
"Inverse" of rb_eval_string().
Definition: string.c:6713
VALUE rb_locale_str_new(const char *ptr, long len)
Identical to rb_str_new(), except it generates a string of "locale" encoding.
Definition: string.c:1236
VALUE rb_str_buf_new(long capa)
Allocates a "string buffer".
Definition: string.c:1492
VALUE rb_external_str_new_cstr(const char *ptr)
Identical to rb_external_str_new(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:1230
VALUE rb_str_length(VALUE)
Identical to rb_str_strlen(), except it returns the value in rb_cInteger.
Definition: string.c:2123
VALUE rb_str_cat_cstr(VALUE dst, const char *src)
Identical to rb_str_cat(), except it assumes the passed pointer is a pointer to a C string.
Definition: string.c:3112
VALUE rb_str_drop_bytes(VALUE str, long len)
Shrinks the given string for the given number of bytes.
Definition: string.c:5144
VALUE rb_str_split(VALUE str, const char *delim)
Divides the given string based on the given delimiter.
Definition: string.c:8781
VALUE rb_usascii_str_new_static(const char *ptr, long len)
Identical to rb_str_new_static(), except it generates a string of "US ASCII" encoding instead of "bin...
Definition: string.c:1021
VALUE rb_str_intern(VALUE str)
Identical to rb_to_symbol(), except it assumes the receiver being an instance of RString.
Definition: symbol.c:837
VALUE rb_obj_as_string(VALUE obj)
Try converting an object to its stringised representation using its to_s method, if any.
Definition: string.c:1643
VALUE rb_struct_define_without_accessor_under(VALUE outer, const char *class_name, VALUE super, rb_alloc_func_t alloc,...)
Identical to rb_struct_define_without_accessor(), except it defines the class under the specified nam...
Definition: struct.c:410
VALUE rb_struct_define_under(VALUE space, const char *name,...)
Identical to rb_struct_define(), except it defines the class under the specified namespace instead of...
Definition: struct.c:451
VALUE rb_struct_new(VALUE klass,...)
Creates an instance of the given struct.
Definition: struct.c:805
VALUE rb_struct_initialize(VALUE self, VALUE values)
Mass-assigns a struct's fields.
Definition: struct.c:732
VALUE rb_struct_define_without_accessor(const char *name, VALUE super, rb_alloc_func_t func,...)
Identical to rb_struct_define(), except it does not define accessor methods.
Definition: struct.c:423
VALUE rb_struct_define(const char *name,...)
Defines a struct class.
Definition: struct.c:436
VALUE rb_struct_alloc(VALUE klass, VALUE values)
Identical to rb_struct_new(), except it takes the field values as a Ruby array.
Definition: struct.c:799
VALUE rb_struct_alloc_noinit(VALUE klass)
Allocates an instance of the given class.
Definition: struct.c:353
VALUE rb_struct_s_members(VALUE klass)
Queries the list of the names of the fields of the given struct class.
Definition: struct.c:64
VALUE rb_struct_members(VALUE self)
Queries the list of the names of the fields of the class of the given struct object.
Definition: struct.c:78
VALUE rb_struct_getmember(VALUE self, ID key)
Identical to rb_struct_aref(), except it takes ID instead of VALUE.
Definition: struct.c:229
int rb_thread_interrupted(VALUE thval)
Checks if the thread's execution was recently interrupted.
Definition: thread.c:1399
VALUE rb_thread_local_aref(VALUE thread, ID key)
This badly named function reads from a Fiber local storage.
Definition: thread.c:3314
VALUE rb_mutex_new(void)
Creates a mutex.
Definition: thread_sync.c:172
int rb_thread_fd_writable(int fd)
Identical to rb_thread_wait_fd(), except it blocks the current thread until the given file descriptor...
Definition: io.c:1397
VALUE rb_thread_kill(VALUE thread)
Terminates the given thread.
Definition: thread.c:2507
VALUE rb_thread_main(void)
Obtains the "main" thread.
Definition: thread.c:2746
VALUE rb_exec_recursive(VALUE(*f)(VALUE g, VALUE h, int r), VALUE g, VALUE h)
"Recursion" API entry point.
void rb_thread_sleep_forever(void)
Blocks indefinitely.
Definition: thread.c:1328
void rb_thread_fd_close(int fd)
Notifies a closing of a file descriptor to other threads.
Definition: thread.c:2447
void rb_thread_wait_for(struct timeval time)
Identical to rb_thread_sleep(), except it takes struct timeval instead.
Definition: thread.c:1367
VALUE rb_mutex_trylock(VALUE mutex)
Attempts to lock the mutex, without waiting for other threads to unlock it.
Definition: thread_sync.c:233
VALUE rb_mutex_locked_p(VALUE mutex)
Queries if there are any threads that holds the lock.
Definition: thread_sync.c:184
VALUE rb_mutex_synchronize(VALUE mutex, VALUE(*func)(VALUE arg), VALUE arg)
Obtains the lock, runs the passed function, and releases the lock when it completes.
Definition: thread_sync.c:597
VALUE rb_thread_stop(void)
Stops the current thread.
Definition: thread.c:2658
VALUE rb_mutex_sleep(VALUE self, VALUE timeout)
Releases the lock held in the mutex and waits for the period of time; reacquires the lock on wakeup.
Definition: thread_sync.c:530
VALUE rb_exec_recursive_paired(VALUE(*f)(VALUE g, VALUE h, int r), VALUE g, VALUE p, VALUE h)
Identical to rb_exec_recursive(), except it checks for the recursion on the ordered pair of { g,...
void rb_unblock_function_t(void *)
This is the type of UBFs.
Definition: thread.h:337
void rb_thread_atfork_before_exec(void)
:FIXME: situation of this function is unclear.
Definition: thread.c:4620
VALUE rb_thread_create(VALUE(*f)(void *g), void *g)
Creates a Ruby thread that is backended by a C function.
void rb_thread_check_ints(void)
Checks for interrupts.
Definition: thread.c:1382
VALUE rb_thread_run(VALUE thread)
This is a rb_thread_wakeup() + rb_thread_schedule() combo.
Definition: thread.c:2649
VALUE rb_thread_wakeup(VALUE thread)
Marks a given thread as eligible for scheduling.
Definition: thread.c:2602
VALUE rb_mutex_unlock(VALUE mutex)
Releases the mutex.
Definition: thread_sync.c:468
VALUE rb_exec_recursive_paired_outer(VALUE(*f)(VALUE g, VALUE h, int r), VALUE g, VALUE p, VALUE h)
Identical to rb_exec_recursive_outer(), except it checks for the recursion on the ordered pair of { g...
void rb_thread_sleep_deadly(void)
Identical to rb_thread_sleep_forever(), except the thread calling this function is considered "dead" ...
Definition: thread.c:1335
void rb_thread_atfork(void)
A pthread_atfork(3posix)-like API.
Definition: thread.c:4615
VALUE rb_thread_current(void)
Obtains the "current" thread.
Definition: thread.c:2725
int rb_thread_alone(void)
Checks if the thread this function is running is the only thread that is currently alive.
Definition: thread.c:3586
int rb_thread_wait_fd(int fd)
Blocks the current thread until the given file descriptor is ready to be read.
Definition: io.c:1391
VALUE rb_thread_local_aset(VALUE thread, ID key, VALUE val)
This badly named function writes to a Fiber local storage.
Definition: thread.c:3462
void rb_thread_schedule(void)
Tries to switch to another thread.
Definition: thread.c:1430
VALUE rb_thread_wakeup_alive(VALUE thread)
Identical to rb_thread_wakeup(), except it doesn't raise on an already killed thread.
Definition: thread.c:2611
VALUE rb_mutex_lock(VALUE mutex)
Attempts to lock the mutex.
Definition: thread_sync.c:395
void rb_thread_sleep(int sec)
Blocks for the given period of time.
Definition: thread.c:1405
VALUE rb_time_nano_new(time_t sec, long nsec)
Identical to rb_time_new(), except it accepts the time in nanoseconds resolution.
Definition: time.c:2482
void rb_timespec_now(struct timespec *ts)
Fills the current time into the given struct.
Definition: time.c:1896
VALUE rb_time_timespec_new(const struct timespec *ts, int offset)
Creates an instance of rb_cTime, with given time and offset.
Definition: time.c:2488
struct timespec rb_time_timespec(VALUE time)
Identical to rb_time_timeval(), except for return type.
Definition: time.c:2651
VALUE rb_time_new(time_t sec, long usec)
Creates an instance of rb_cTime with the given time and the local timezone.
Definition: time.c:2474
struct timeval rb_time_timeval(VALUE time)
Converts an instance of rb_cTime to a struct timeval that represents the identical point of time.
Definition: time.c:2634
struct timeval rb_time_interval(VALUE num)
Creates a "time interval".
Definition: time.c:2628
VALUE rb_time_num_new(VALUE timev, VALUE off)
Identical to rb_time_timespec_new(), except it takes Ruby values instead of C structs.
Definition: time.c:2511
VALUE rb_time_utc_offset(VALUE time)
Queries the offset, in seconds between the time zone of the time and the UTC.
Definition: time.c:4694
struct timespec rb_time_timespec_interval(VALUE num)
Identical to rb_time_interval(), except for return type.
Definition: time.c:2665
VALUE rb_mod_remove_cvar(VALUE mod, VALUE name)
Resembles Module#remove_class_variable.
Definition: variable.c:3859
VALUE rb_obj_instance_variables(VALUE obj)
Resembles Object#instance_variables.
Definition: variable.c:1903
VALUE rb_f_untrace_var(int argc, const VALUE *argv)
Deletes the passed tracer from the passed global variable, or if omitted, deletes everything.
Definition: variable.c:674
VALUE rb_const_get(VALUE space, ID name)
Identical to rb_const_defined(), except it returns the actual defined value.
Definition: variable.c:2850
VALUE rb_const_list(void *)
This is another mysterious API that comes with no documents at all.
Definition: variable.c:3070
VALUE rb_path2class(const char *path)
Resolves a Q::W::E::R-style path string to the actual class it points.
Definition: variable.c:305
VALUE rb_autoload_p(VALUE space, ID name)
Queries if an autoload is defined at a point.
Definition: variable.c:2723
VALUE rb_attr_get(VALUE obj, ID name)
Identical to rb_ivar_get()
Definition: variable.c:1310
void rb_set_class_path(VALUE klass, VALUE space, const char *name)
Names a class.
Definition: variable.c:252
VALUE rb_ivar_set(VALUE obj, ID name, VALUE val)
Identical to rb_iv_set(), except it accepts the name as an ID instead of a C string.
Definition: variable.c:1592
VALUE rb_mod_remove_const(VALUE space, VALUE name)
Resembles Module#remove_const.
Definition: variable.c:2942
VALUE rb_class_path_cached(VALUE mod)
Just another name of rb_mod_name.
Definition: variable.c:198
VALUE rb_f_trace_var(int argc, const VALUE *argv)
Traces a global variable.
Definition: variable.c:628
void rb_cvar_set(VALUE klass, ID name, VALUE val)
Assigns a value to a class variable.
Definition: variable.c:3624
VALUE rb_cvar_get(VALUE klass, ID name)
Obtains a value from a class variable.
Definition: variable.c:3693
VALUE rb_mod_constants(int argc, const VALUE *argv, VALUE recv)
Resembles Module#constants.
Definition: variable.c:3102
VALUE rb_path_to_class(VALUE path)
Identical to rb_path2class(), except it accepts the path as Ruby's string instead of C's.
Definition: variable.c:260
VALUE rb_ivar_get(VALUE obj, ID name)
Identical to rb_iv_get(), except it accepts the name as an ID instead of a C string.
Definition: variable.c:1302
void rb_ivar_foreach(VALUE obj, int(*func)(ID name, VALUE val, st_data_t arg), st_data_t arg)
Iterates over an object's instance variables.
void rb_const_set(VALUE space, ID name, VALUE val)
Names a constant.
Definition: variable.c:3303
VALUE rb_autoload_load(VALUE space, ID name)
Kicks the autoload procedure as if it was "touched".
Definition: variable.c:2685
VALUE rb_mod_name(VALUE mod)
Queries the name of a module.
Definition: variable.c:138
VALUE rb_class_name(VALUE obj)
Queries the name of the given object's class.
Definition: variable.c:311
VALUE rb_const_get_at(VALUE space, ID name)
Identical to rb_const_defined_at(), except it returns the actual defined value.
Definition: variable.c:2856
void rb_set_class_path_string(VALUE klass, VALUE space, VALUE name)
Identical to rb_set_class_path(), except it accepts the name as Ruby's string instead of C's.
Definition: variable.c:232
void rb_alias_variable(ID dst, ID src)
Aliases a global variable.
Definition: variable.c:860
void rb_define_class_variable(VALUE, const char *, VALUE)
Just another name of rb_cv_set.
Definition: variable.c:3733
VALUE rb_obj_remove_instance_variable(VALUE obj, VALUE name)
Resembles Object#remove_instance_variable.
Definition: variable.c:1958
void * rb_mod_const_of(VALUE, void *)
This is a variant of rb_mod_const_at().
Definition: variable.c:3048
st_index_t rb_ivar_count(VALUE obj)
Number of instance variables defined on an object.
Definition: variable.c:1835
void * rb_mod_const_at(VALUE, void *)
This API is mysterious.
Definition: variable.c:3031
VALUE rb_const_remove(VALUE space, ID name)
Identical to rb_mod_remove_const(), except it takes the name as ID instead of VALUE.
Definition: variable.c:2953
VALUE rb_const_get_from(VALUE space, ID name)
Identical to rb_const_defined_at(), except it returns the actual defined value.
Definition: variable.c:2844
VALUE rb_ivar_defined(VALUE obj, ID name)
Queries if the instance variable is defined at the object.
Definition: variable.c:1609
VALUE rb_cv_get(VALUE klass, const char *name)
Identical to rb_cvar_get(), except it accepts C's string instead of ID.
Definition: variable.c:3726
int rb_const_defined_at(VALUE space, ID name)
Identical to rb_const_defined(), except it doesn't look for parent classes.
Definition: variable.c:3164
void rb_cv_set(VALUE klass, const char *name, VALUE val)
Identical to rb_cvar_set(), except it accepts C's string instead of ID.
Definition: variable.c:3719
VALUE rb_mod_class_variables(int argc, const VALUE *argv, VALUE recv)
Resembles Module#class_variables.
Definition: variable.c:3824
VALUE rb_f_global_variables(void)
Queries the list of global variables.
Definition: variable.c:828
VALUE rb_cvar_defined(VALUE klass, ID name)
Queries if the given class has the given class variable.
Definition: variable.c:3700
VALUE rb_class_path(VALUE mod)
Identical to rb_mod_name(), except it returns #<Class: ...> style inspection for anonymous modules.
Definition: variable.c:189
int rb_const_defined_from(VALUE space, ID name)
Identical to rb_const_defined(), except it returns false for private constants.
Definition: variable.c:3152
int rb_const_defined(VALUE space, ID name)
Queries if the constant is defined at the namespace.
Definition: variable.c:3158
void rb_free_generic_ivar(VALUE obj)
Frees the list of instance variables.
Definition: variable.c:1172
int rb_respond_to(VALUE obj, ID mid)
Queries if the object responds to the method.
Definition: vm_method.c:2799
VALUE(* rb_alloc_func_t)(VALUE klass)
This is the type of functions that ruby calls when trying to allocate an object.
Definition: vm.h:216
void rb_undef_alloc_func(VALUE klass)
Deletes the allocator function of a class.
Definition: vm_method.c:1151
const char * rb_sourcefile(void)
Resembles __FILE__.
Definition: vm.c:1609
void rb_alias(VALUE klass, ID dst, ID src)
Resembles alias.
Definition: vm_method.c:2134
int rb_method_basic_definition_p(VALUE klass, ID mid)
Well... Let us hesitate from describing what a "basic definition" is.
Definition: vm_method.c:2677
void rb_attr(VALUE klass, ID name, int need_reader, int need_writer, int honour_visibility)
This function resembles now-deprecated Module#attr.
Definition: vm_method.c:1714
void rb_remove_method(VALUE klass, const char *name)
Removes a method.
Definition: vm_method.c:1563
VALUE rb_check_funcall(VALUE recv, ID mid, int argc, const VALUE *argv)
Identical to rb_funcallv(), except it returns RUBY_Qundef instead of raising rb_eNoMethodError.
Definition: vm_eval.c:664
int rb_frame_method_id_and_class(ID *idp, VALUE *klassp)
Resembles __method__.
Definition: vm.c:2578
rb_alloc_func_t rb_get_alloc_func(VALUE klass)
Queries the allocator function of a class.
Definition: vm_method.c:1157
VALUE rb_check_funcall_kw(VALUE recv, ID mid, int argc, const VALUE *argv, int kw_splat)
Identical to rb_check_funcall(), except you can specify how to handle the last element of the given a...
Definition: vm_eval.c:658
VALUE rb_mod_module_eval(int argc, const VALUE *argv, VALUE mod)
Identical to rb_obj_instance_eval(), except it evaluates within the context of module.
Definition: vm_eval.c:2138
void rb_remove_method_id(VALUE klass, ID mid)
Identical to rb_remove_method(), except it accepts the method name as ID.
Definition: vm_method.c:1557
VALUE rb_mod_module_exec(int argc, const VALUE *argv, VALUE mod)
Identical to rb_obj_instance_exec(), except it evaluates within the context of module.
Definition: vm_eval.c:2172
void rb_define_alloc_func(VALUE klass, rb_alloc_func_t func)
Sets the allocator function of a class.
VALUE rb_obj_instance_exec(int argc, const VALUE *argv, VALUE recv)
Executes the given block within the context of the receiver.
Definition: vm_eval.c:2099
VALUE rb_eval_cmd_kw(VALUE cmd, VALUE arg, int kw_splat)
This API is practically a variant of rb_proc_call_kw() now.
Definition: vm_eval.c:1900
VALUE rb_f_notimplement(int argc, const VALUE *argv, VALUE obj, VALUE marker)
Raises rb_eNotImpError.
Definition: vm_method.c:360
VALUE rb_apply(VALUE recv, ID mid, VALUE args)
Identical to rb_funcallv(), except it takes Ruby's array instead of C's.
Definition: vm_eval.c:1077
VALUE rb_make_backtrace(void)
Creates the good old fashioned array-of-strings style backtrace info.
int rb_method_boundp(VALUE klass, ID id, int ex)
Queries if the klass has this method.
Definition: vm_method.c:1675
void rb_backtrace(void)
Prints the backtrace out to the standard error.
VALUE rb_obj_instance_eval(int argc, const VALUE *argv, VALUE recv)
Evaluates a string containing Ruby source code, or the given block, within the context of the receive...
Definition: vm_eval.c:2069
int rb_sourceline(void)
Resembles __LINE__.
Definition: vm.c:1623
int rb_obj_respond_to(VALUE obj, ID mid, int private_p)
Identical to rb_respond_to(), except it additionally takes the visibility parameter.
Definition: vm_method.c:2783
ID rb_intern2(const char *name, long len)
Identical to rb_intern(), except it additionally takes the length of the string.
Definition: symbol.c:775
VALUE rb_check_symbol(volatile VALUE *namep)
Identical to rb_check_id(), except it returns an instance of rb_cSymbol instead.
Definition: symbol.c:1110
static ID rb_intern_const(const char *str)
This is a "tiny optimisation" over rb_intern().
Definition: symbol.h:276
VALUE rb_id2sym(ID id)
Allocates an instance of rb_cSymbol that has the given id.
Definition: symbol.c:916
ID rb_check_id(volatile VALUE *namep)
Detects if the given name is already interned or not.
Definition: symbol.c:1077
ID rb_intern(const char *name)
Finds or creates a symbol of the given name.
Definition: symbol.c:782
VALUE rb_sym2str(VALUE id)
Identical to rb_id2str(), except it takes an instance of rb_cSymbol rather than an ID.
Definition: symbol.c:935
VALUE rb_to_symbol(VALUE name)
Identical to rb_intern_str(), except it generates a dynamic symbol if necessary.
Definition: string.c:11770
ID rb_sym2id(VALUE obj)
Converts an instance of rb_cSymbol into an ID.
Definition: symbol.c:882
ID rb_to_id(VALUE str)
Identical to rb_intern(), except it takes an instance of rb_cString.
Definition: string.c:11760
const char * rb_id2name(ID id)
Retrieves the name mapped to the given id.
Definition: symbol.c:952
ID rb_intern_str(VALUE str)
Identical to rb_intern(), except it takes an instance of rb_cString.
Definition: symbol.c:788
VALUE rb_id2str(ID id)
Identical to rb_id2name(), except it returns a Ruby's String instead of C's.
Definition: symbol.c:946
rb_gvar_setter_t rb_gvar_var_setter
Definition: variable.h:119
rb_gvar_marker_t rb_gvar_var_marker
Definition: variable.h:128
void rb_define_global_const(const char *name, VALUE val)
Identical to rb_define_const(), except it defines that of "global", i.e.
Definition: variable.c:3409
VALUE rb_gv_get(const char *name)
Obtains a global variable.
Definition: variable.c:786
void rb_define_variable(const char *name, VALUE *var)
"Shares" a global variable between Ruby and C.
Definition: variable.c:599
void rb_gvar_marker_t(VALUE *var)
Type that represents a global variable marker function.
Definition: variable.h:53
void rb_deprecate_constant(VALUE mod, const char *name)
Asserts that the given constant is deprecated.
Definition: variable.c:3457
void rb_gvar_setter_t(VALUE val, ID id, VALUE *data)
Type that represents a global variable setter function.
Definition: variable.h:46
rb_gvar_setter_t rb_gvar_val_setter
This is the setter function that backs global variables defined from a ruby script.
Definition: variable.h:94
rb_gvar_marker_t rb_gvar_undef_marker
Definition: variable.h:80
void rb_define_readonly_variable(const char *name, const VALUE *var)
Identical to rb_define_variable(), except it does not allow Ruby programs to assign values to such gl...
Definition: variable.c:605
rb_gvar_setter_t rb_gvar_readonly_setter
This function just raises rb_eNameError.
Definition: variable.h:135
rb_gvar_getter_t rb_gvar_undef_getter
Definition: variable.h:62
VALUE rb_gv_set(const char *name, VALUE val)
Assigns to a global variable.
Definition: variable.c:772
rb_gvar_marker_t rb_gvar_val_marker
This is the setter function that backs global variables defined from a ruby script.
Definition: variable.h:101
void rb_define_virtual_variable(const char *name, rb_gvar_getter_t *getter, rb_gvar_setter_t *setter)
Defines a global variable that is purely function-backended.
Definition: variable.c:611
void rb_define_const(VALUE klass, const char *name, VALUE val)
Defines a Ruby level constant under a namespace.
Definition: variable.c:3397
VALUE rb_gvar_getter_t(ID id, VALUE *data)
Type that represents a global variable getter function.
Definition: variable.h:37
VALUE rb_iv_get(VALUE obj, const char *name)
Obtains an instance variable.
Definition: variable.c:3881
rb_gvar_setter_t rb_gvar_undef_setter
Definition: variable.h:71
rb_gvar_getter_t rb_gvar_val_getter
This is the getter function that backs global variables defined from a ruby script.
Definition: variable.h:87
VALUE rb_iv_set(VALUE obj, const char *name, VALUE val)
Assigns to an instance variable.
Definition: variable.c:3892
void rb_define_hooked_variable(const char *name, VALUE *var, rb_gvar_getter_t *getter, rb_gvar_setter_t *setter)
Identical to rb_define_virtual_variable(), but can also specify a storage.
Definition: variable.c:580
rb_gvar_getter_t rb_gvar_var_getter
Definition: variable.h:110
VALUE rb_io_get_io(VALUE io)
Identical to rb_io_check_io(), except it raises exceptions on conversion failures.
Definition: io.c:802
#define strtod(s, e)
Just another name of ruby_strtod.
Definition: util.h:212
#define strdup(s)
Just another name of ruby_strdup.
Definition: util.h:176
const int ruby_api_version[3]
API versions, in { major, minor, teeny } order.
Definition: version.c:27
void ruby_vm_at_exit(void(*func)(ruby_vm_t *))
ruby_vm_at_exit registers a function func to be invoked when a VM passed away.
Definition: vm.c:699
int ruby_vm_destruct(ruby_vm_t *vm)
Destructs the passed VM.
Definition: vm.c:2778
static unsigned int RB_FIX2UINT(VALUE x)
Converts a Fixnum into C's int.
Definition: int.h:208
unsigned long rb_num2uint(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned long.
Definition: numeric.c:3296
long rb_fix2int(VALUE num)
Identical to rb_num2int().
Definition: numeric.c:3290
static int rb_num2int_inline(VALUE x)
Converts an instance of rb_cNumeric into C's int.
Definition: int.h:158
long rb_num2int(VALUE num)
Converts an instance of rb_cNumeric into C's long.
Definition: numeric.c:3284
static VALUE rb_uint2num_inline(unsigned int v)
Converts a C's unsigned int into an instance of rb_cInteger.
Definition: int.h:254
static int RB_FIX2INT(VALUE x)
Converts a Fixnum into C's int.
Definition: int.h:129
static unsigned int RB_NUM2UINT(VALUE x)
Converts an instance of rb_cNumeric into C's unsigned int.
Definition: int.h:185
static VALUE rb_int2num_inline(int v)
Converts a C's int into an instance of rb_cInteger.
Definition: int.h:239
unsigned long rb_fix2uint(VALUE num)
Identical to rb_num2uint().
Definition: numeric.c:3302
VALUE rb_str_format(int argc, const VALUE *argv, VALUE fmt)
Formats a string.
Definition: sprintf.c:214
VALUE rb_f_sprintf(int argc, const VALUE *argv)
Identical to rb_str_format(), except how the arguments are arranged.
Definition: sprintf.c:208
VALUE rb_sprintf(const char *fmt,...)
Ruby's extended sprintf(3).
Definition: sprintf.c:1201
VALUE rb_str_vcatf(VALUE dst, const char *fmt, va_list ap)
Identical to rb_str_catf(), except it takes a va_list.
Definition: sprintf.c:1214
VALUE rb_vsprintf(const char *fmt, va_list ap)
Identical to rb_sprintf(), except it takes a va_list.
Definition: sprintf.c:1195
VALUE rb_str_catf(VALUE dst, const char *fmt,...)
Identical to rb_sprintf(), except it renders the output to the specified object rather than creating ...
Definition: sprintf.c:1241
LONG_LONG rb_num2ll(VALUE num)
Converts an instance of rb_cNumeric into C's long long.
unsigned LONG_LONG rb_num2ull(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned long long.
VALUE rb_ull2inum(unsigned LONG_LONG num)
Converts a C's unsigned long long into an instance of rb_cInteger.
VALUE rb_ll2inum(LONG_LONG num)
Converts a C's long long into an instance of rb_cInteger.
static LONG_LONG rb_num2ll_inline(VALUE x)
Converts an instance of rb_cNumeric into C's long long.
Definition: long_long.h:110
VALUE rb_int2inum(intptr_t i)
Converts a C's intptr_t into an instance of rb_cInteger.
Definition: bignum.c:3237
VALUE rb_uint2big(uintptr_t i)
Converts a C's intptr_t into an instance of rb_cInteger.
Definition: bignum.c:3187
VALUE rb_int2big(intptr_t i)
Converts a C's intptr_t into an instance of rb_cInteger.
Definition: bignum.c:3209
VALUE rb_uint2inum(uintptr_t i)
Converts a C's uintptr_t into an instance of rb_cInteger.
Definition: bignum.c:3230
VALUE rb_catch_obj(VALUE tag, rb_block_call_func_t func, VALUE data)
Identical to rb_catch(), except it catches arbitrary Ruby objects.
Definition: vm_eval.c:2401
VALUE rb_each(VALUE obj)
This is a shorthand of calling obj.each.
Definition: vm_eval.c:1657
VALUE rb_block_call(VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t proc, VALUE data2)
Identical to rb_funcallv(), except it additionally passes a function as a block.
Definition: vm_eval.c:1595
VALUE rb_yield_values(int n,...)
Identical to rb_yield(), except it takes variadic number of parameters and pass them to the block.
Definition: vm_eval.c:1369
VALUE rb_yield_splat(VALUE ary)
Identical to rb_yield_values(), except it splats an array to generate the list of parameters.
Definition: vm_eval.c:1403
void rb_throw(const char *tag, VALUE val)
Transfers control to the end of the active catch block waiting for tag.
Definition: vm_eval.c:2289
VALUE rb_yield_values2(int n, const VALUE *argv)
Identical to rb_yield_values(), except it takes the parameters as a C array instead of variadic argum...
Definition: vm_eval.c:1391
VALUE rb_yield(VALUE val)
Yields the block.
Definition: vm_eval.c:1357
VALUE rb_yield_values_kw(int n, const VALUE *argv, int kw_splat)
Identical to rb_yield_values2(), except you can specify how to handle the last element of the given a...
Definition: vm_eval.c:1397
rb_block_call_func * rb_block_call_func_t
Shorthand type that represents an iterator-written-in-C function pointer.
Definition: iterator.h:88
VALUE rb_yield_block(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg))
Pass a passed block.
void rb_throw_obj(VALUE tag, VALUE val)
Identical to rb_throw(), except it allows arbitrary Ruby object to become a tag.
Definition: vm_eval.c:2264
VALUE rb_block_call_func(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg))
This is the type of a function that the interpreter expect for C-backended blocks.
Definition: iterator.h:83
VALUE rb_iterate(VALUE(*func1)(VALUE), VALUE data1, rb_block_call_func_t proc, VALUE data2)
Old way to iterate a block.
Definition: vm_eval.c:1569
VALUE rb_catch(const char *tag, rb_block_call_func_t func, VALUE data)
Executes the passed block and catches values thrown from inside of it.
Definition: vm_eval.c:2359
VALUE rb_block_call_kw(VALUE obj, ID mid, int argc, const VALUE *argv, rb_block_call_func_t proc, VALUE data2, int kw_splat)
Identical to rb_funcallv_kw(), except it additionally passes a function as a block.
Definition: vm_eval.c:1602
VALUE rb_yield_splat_kw(VALUE ary, int kw_splat)
Identical to rb_yield_splat(), except you can specify how to handle the last element of the given arr...
Definition: vm_eval.c:1416
static int rb_fd_max(const rb_fdset_t *f)
It seems this function has no use.
Definition: largesize.h:209
int rb_fd_select(int nfds, rb_fdset_t *rfds, rb_fdset_t *wfds, rb_fdset_t *efds, struct timeval *timeout)
Waits for multiple file descriptors at once.
int rb_fd_isset(int fd, const rb_fdset_t *f)
Queries if the given FD is in the given set.
void rb_fd_clr(int fd, rb_fdset_t *f)
Releases a specific FD from the given fdset.
void rb_fd_copy(rb_fdset_t *dst, const fd_set *src, int max)
Destructively overwrites an fdset with another.
void rb_fd_dup(rb_fdset_t *dst, const rb_fdset_t *src)
Identical to rb_fd_copy(), except it copies unlimited number of file descriptors.
void rb_fd_term(rb_fdset_t *f)
Destroys the rb_fdset_t, releasing any memory and resources it used.
void rb_fd_zero(rb_fdset_t *f)
Wipes out the current set of FDs.
static fd_set * rb_fd_ptr(const rb_fdset_t *f)
Raw pointer to fd_set.
Definition: largesize.h:195
static long rb_num2long_inline(VALUE x)
Converts an instance of rb_cNumeric into C's long.
Definition: long.h:267
static VALUE RB_INT2FIX(long i)
Converts a C's long into an instance of rb_cInteger.
Definition: long.h:111
static unsigned long rb_num2ulong_inline(VALUE x)
Converts an instance of rb_cNumeric into C's unsigned long.
Definition: long.h:293
static int rb_long2int_inline(long n)
Checks if int can hold the given integer.
Definition: long.h:135
static VALUE rb_ulong2num_inline(unsigned long v)
Converts a C's unsigned long into an instance of rb_cInteger.
Definition: long.h:323
static long rb_fix2long(VALUE x)
Converts a Fixnum into C's long.
Definition: long.h:231
void rb_out_of_int(SIGNED_VALUE num)
This is an utility function to raise an rb_eRangeError.
Definition: numeric.c:3211
long rb_num2long(VALUE num)
Converts an instance of rb_cNumeric into C's long.
Definition: numeric.c:3136
unsigned long rb_num2ulong(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned long.
Definition: numeric.c:3205
static VALUE rb_long2num_inline(long v)
Converts a C's long into an instance of rb_cInteger.
Definition: long.h:308
static unsigned long rb_fix2ulong(VALUE x)
Converts a Fixnum into C's unsigned long.
Definition: long.h:252
VALUE rb_marshal_dump(VALUE obj, VALUE port)
Serialises the given object and all its referring objects, to write them down to the passed port.
Definition: marshal.c:2423
void rb_marshal_define_compat(VALUE newclass, VALUE oldclass, VALUE(*dumper)(VALUE), VALUE(*loader)(VALUE, VALUE))
Marshal format compatibility layer.
Definition: marshal.c:148
VALUE rb_marshal_load(VALUE port)
Deserialises a previous output of rb_marshal_dump() into a network of objects.
Definition: marshal.c:2429
static void * rb_alloc_tmp_buffer2(volatile VALUE *store, long count, size_t elsize)
This is an implementation detail of RB_ALLOCV_N().
Definition: memory.h:640
static int rb_mul_size_overflow(size_t a, size_t b, size_t max, size_t *c)
Definition: memory.h:525
VALUE type(ANYARGS)
ANYARGS-ed function type.
Definition: cxxanyargs.hpp:56
VALUE rb_newobj(void)
This is the implementation detail of RB_NEWOBJ.
Definition: gc.c:2826
void rb_copy_generic_ivar(VALUE clone, VALUE obj)
Copies the list of instance variables.
Definition: variable.c:1736
VALUE rb_newobj_of(VALUE klass, VALUE flags)
This is the implementation detail of RB_NEWOBJ_OF.
Definition: gc.c:2832
static void rb_clone_setup(VALUE clone, VALUE obj)
Definition: newobj.h:173
static void rb_dup_setup(VALUE dup, VALUE obj)
Definition: newobj.h:190
const char * ruby_enc_find_basename(const char *name, long *baselen, long *alllen, rb_encoding *enc)
Our own encoding-aware version of basename(3).
Definition: file.c:4592
char * rb_enc_path_end(const char *path, const char *end, rb_encoding *enc)
This just returns the passed end basically.
Definition: file.c:3467
char * rb_enc_path_last_separator(const char *path, const char *end, rb_encoding *enc)
Returns the last path component.
Definition: file.c:3433
char * rb_enc_path_next(const char *path, const char *end, rb_encoding *enc)
Returns a path component directly adjacent to the passed pointer.
Definition: file.c:3385
char * rb_enc_path_skip_prefix(const char *path, const char *end, rb_encoding *enc)
Seeks for non-prefix part of a pathname.
Definition: file.c:3399
const char * ruby_enc_find_extname(const char *name, long *len, rb_encoding *enc)
Our own encoding-aware version of extname.
Definition: file.c:4839
#define rb_fd_init
Initialises the :given :rb_fdset_t.
Definition: posix.h:63
#define rb_fd_set
Sets the given fd to the rb_fdset_t.
Definition: posix.h:54
fd_set rb_fdset_t
The data structure which wraps the fd_set bitmap used by select(2).
Definition: posix.h:48
static long RARRAY_EMBED_LEN(VALUE ary)
Queries the length of the array.
Definition: rarray.h:297
void rb_ary_detransient(VALUE a)
Destructively converts an array of transient backend into ordinal one.
Definition: array.c:458
static long rb_array_len(VALUE a)
Queries the length of the array.
Definition: rarray.h:317
static bool RARRAY_TRANSIENT_P(VALUE ary)
Queries if the array is a transient array.
Definition: rarray.h:364
static int RARRAY_LENINT(VALUE ary)
Identical to rb_array_len(), except it differs for the return type.
Definition: rarray.h:343
static void RARRAY_ASET(VALUE ary, long i, VALUE v)
Assigns an object in an array.
Definition: rarray.h:590
static VALUE * RARRAY_PTR(VALUE ary)
Wild use of a C pointer.
Definition: rarray.h:570
@ RARRAY_EMBED_LEN_SHIFT
Where ::RARRAY_EMBED_LEN_MASK resides.
Definition: rarray.h:165
#define RARRAY_AREF(a, i)
Definition: rarray.h:607
static VALUE RBASIC_CLASS(VALUE obj)
Queries the class of an object.
Definition: rbasic.h:152
@ RVALUE_EMBED_LEN_MAX
Max possible number of objects that can be embedded.
Definition: rbasic.h:55
int rb_big_sign(VALUE num)
The "sign" of a bignum.
Definition: bignum.c:6788
static bool RBIGNUM_NEGATIVE_P(VALUE b)
Checks if the bignum is negative.
Definition: rbignum.h:74
static bool RBIGNUM_POSITIVE_P(VALUE b)
Checks if the bignum is positive.
Definition: rbignum.h:61
#define RCLASS_SUPER
Just another name of rb_class_get_superclass.
Definition: rclass.h:44
VALUE rb_data_object_wrap(VALUE klass, void *datap, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
This is the primitive way to wrap an existing C struct into RData.
Definition: gc.c:2978
static VALUE rb_data_object_alloc(VALUE klass, void *data, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
Definition: rdata.h:367
static VALUE rb_data_object_make(VALUE klass, RUBY_DATA_FUNC mark_func, RUBY_DATA_FUNC free_func, void **datap, size_t size)
This is an implementation detail of Data_Make_Struct.
Definition: rdata.h:358
VALUE rb_data_object_zalloc(VALUE klass, size_t size, RUBY_DATA_FUNC dmark, RUBY_DATA_FUNC dfree)
Identical to rb_data_object_wrap(), except it allocates a new data region internally instead of takin...
Definition: gc.c:2986
void(* RUBY_DATA_FUNC)(void *)
This is the type of callbacks registered to RData.
Definition: rdata.h:108
static VALUE rb_obj_wb_unprotect(VALUE x, const char *filename, int line)
This is the implementation of RB_OBJ_WB_UNPROTECT().
Definition: rgengc.h:363
void rb_gc_writebarrier(VALUE old, VALUE young)
This is the implementation of RB_OBJ_WRITE().
Definition: gc.c:8721
void rb_gc_writebarrier_unprotect(VALUE obj)
This is the implementation of RB_OBJ_WB_UNPROTECT().
Definition: gc.c:8757
static bool RB_OBJ_PROMOTED(VALUE obj)
Tests if the object is "promoted" – that is, whether the object experienced one or more GC marks.
Definition: rgengc.h:343
static bool RB_OBJ_PROMOTED_RAW(VALUE obj)
This is the implementation of RB_OBJ_PROMOTED().
Definition: rgengc.h:323
VALUE rb_hash_set_ifnone(VALUE hash, VALUE ifnone)
This is the implementation detail of RHASH_SET_IFNONE.
Definition: hash.c:99
#define RHASH_IFNONE(h)
Definition: rhash.h:72
struct st_table * rb_hash_tbl(VALUE hash, const char *file, int line)
This is the implementation detail of RHASH_TBL.
Definition: hash.c:1621
#define RHASH_SIZE(h)
Queries the size of the hash.
Definition: rhash.h:82
size_t rb_hash_size_num(VALUE hash)
This is the implementation detail of RHASH_SIZE.
Definition: hash.c:2986
#define RHASH_EMPTY_P(h)
Checks if the hash is empty.
Definition: rhash.h:92
@ ROBJECT_EMBED_LEN_MAX
Max possible number of instance variables that can be embedded.
Definition: robject.h:84
static uint32_t ROBJECT_NUMIV(VALUE obj)
Queries the number of instance variables.
Definition: robject.h:145
static VALUE * ROBJECT_IVPTR(VALUE obj)
Queries the instance variables.
Definition: robject.h:171
static VALUE RREGEXP_SRC(VALUE rexp)
Convenient getter function.
Definition: rregexp.h:103
static char * RREGEXP_SRC_END(VALUE rexp)
Convenient getter function.
Definition: rregexp.h:163
static long RREGEXP_SRC_LEN(VALUE rexp)
Convenient getter function.
Definition: rregexp.h:144
static char * RREGEXP_SRC_PTR(VALUE rexp)
Convenient getter function.
Definition: rregexp.h:125
VALUE rb_str_export_locale(VALUE obj)
Identical to rb_str_export(), except it converts into the locale encoding instead.
Definition: string.c:1266
char * rb_string_value_cstr(volatile VALUE *ptr)
Identical to rb_string_value_ptr(), except it additionally checks for the contents for viability as a...
Definition: string.c:2575
static long RSTRING_EMBED_LEN(VALUE str)
Queries the length of the string.
Definition: rstring.h:423
static int RSTRING_LENINT(VALUE str)
Identical to RSTRING_LEN(), except it differs for the return type.
Definition: rstring.h:554
static char * RSTRING_END(VALUE str)
Queries the end of the contents pointer of the string.
Definition: rstring.h:528
VALUE rb_string_value(volatile VALUE *ptr)
Identical to rb_str_to_str(), except it fills the passed pointer with the converted object.
Definition: string.c:2459
static long RSTRING_LEN(VALUE str)
Queries the length of the string.
Definition: rstring.h:484
VALUE rb_str_export(VALUE obj)
Identical to rb_str_to_str(), except it additionally converts the string into default external encodi...
Definition: string.c:1260
char * rb_string_value_ptr(volatile VALUE *ptr)
Identical to rb_str_to_str(), except it returns the converted string's backend memory region.
Definition: string.c:2470
VALUE rb_str_to_str(VALUE obj)
Identical to rb_check_string_type(), except it raises exceptions in case of conversion failures.
Definition: string.c:1570
static char * RSTRING_PTR(VALUE str)
Queries the contents pointer of the string.
Definition: rstring.h:498
static long RSTRUCT_LEN(VALUE st)
Returns the number of struct members.
Definition: rstruct.h:94
static VALUE RSTRUCT_SET(VALUE st, int k, VALUE v)
Resembles Struct#[]=.
Definition: rstruct.h:104
static VALUE RSTRUCT_GET(VALUE st, int k)
Resembles Struct#[].
Definition: rstruct.h:114
VALUE rb_struct_aset(VALUE st, VALUE k, VALUE v)
Resembles Struct#[]=.
Definition: struct.c:1221
VALUE rb_struct_size(VALUE st)
Returns the number of struct members.
Definition: struct.c:1474
VALUE rb_struct_aref(VALUE st, VALUE k)
Resembles Struct#[].
Definition: struct.c:1183
static bool RTYPEDDATA_P(VALUE obj)
Checks whether the passed object is RTypedData or RData.
Definition: rtypeddata.h:540
VALUE rb_data_typed_object_wrap(VALUE klass, void *datap, const rb_data_type_t *type)
This is the primitive way to wrap an existing C struct into RTypedData.
Definition: gc.c:2994
VALUE rb_data_typed_object_zalloc(VALUE klass, size_t size, const rb_data_type_t *type)
Identical to rb_data_typed_object_wrap(), except it allocates a new data region internally instead of...
Definition: gc.c:3002
static VALUE rb_data_typed_object_alloc(VALUE klass, void *datap, const rb_data_type_t *type)
Definition: rtypeddata.h:599
static VALUE rb_data_typed_object_make(VALUE klass, const rb_data_type_t *type, void **datap, size_t size)
While we don't stop you from using this function, it seems to be an implementation detail of TypedDat...
Definition: rtypeddata.h:590
static const struct rb_data_type_struct * RTYPEDDATA_TYPE(VALUE obj)
Queries for the type of given object.
Definition: rtypeddata.h:563
VALUE rb_argv0
The value of $0 at process bootup.
Definition: ruby.c:1566
VALUE rb_get_argv(void)
Queries the arguments passed to the current process that you can access from Ruby as ARGV.
Definition: io.c:13963
void * rb_load_file_str(VALUE file)
Identical to rb_load_file(), except it takes the argument as a Ruby's string instead of C's.
Definition: ruby.c:2410
void * rb_load_file(const char *file)
Loads the given file.
Definition: ruby.c:2403
VALUE rb_get_path(VALUE obj)
Converts an object to a path.
Definition: file.c:245
const char * rb_class2name(VALUE klass)
Queries the name of the passed class.
Definition: variable.c:317
VALUE rb_require(const char *feature)
Identical to rb_require_string(), except it takes C's string instead of Ruby's.
Definition: load.c:1273
const char * rb_obj_classname(VALUE obj)
Queries the name of the class of the passed object.
Definition: variable.c:326
void rb_p(VALUE obj)
Inspects an object.
Definition: io.c:8670
int ruby_vsnprintf(char *str, size_t n, char const *fmt, va_list ap)
Identical to ruby_snprintf(), except it takes a va_list.
Definition: sprintf.c:1008
VALUE rb_get_path_no_checksafe(VALUE)
Definition: file.c:239
int ruby_native_thread_p(void)
Queries if the thread which calls this function is a ruby's thread.
Definition: thread.c:5338
int ruby_snprintf(char *str, size_t n, char const *fmt,...)
Our own locale-insensitive version of snprintf(3).
Definition: sprintf.c:1035
int rb_thread_fd_select(int nfds, rb_fdset_t *rfds, rb_fdset_t *wfds, rb_fdset_t *efds, struct timeval *timeout)
Waits for multiple file descriptors at once.
Definition: thread.c:4118
short rb_num2short(VALUE num)
Converts an instance of rb_cNumeric into C's short.
Definition: numeric.c:3340
unsigned short rb_num2ushort(VALUE num)
Converts an instance of rb_cNumeric into C's unsigned short.
Definition: numeric.c:3358
short rb_fix2short(VALUE num)
Identical to rb_num2short().
Definition: numeric.c:3349
unsigned short rb_fix2ushort(VALUE num)
Identical to rb_num2ushort().
Definition: numeric.c:3368
static short rb_num2short_inline(VALUE x)
Identical to rb_num2short().
Definition: short.h:105
static bool RB_STATIC_SYM_P(VALUE obj)
Checks if the given object is a static symbol.
static bool RB_TEST(VALUE obj)
Emulates Ruby's "if" statement.
static bool RB_FIXNUM_P(VALUE obj)
Checks if the given object is a so-called Fixnum.
static bool RB_IMMEDIATE_P(VALUE obj)
Checks if the given object is an immediate i.e.
static bool RB_SPECIAL_CONST_P(VALUE obj)
Checks if the given object is of enum ruby_special_consts.
static VALUE rb_special_const_p(VALUE obj)
Identical to RB_SPECIAL_CONST_P, except it returns a VALUE.
@ RUBY_Qtrue
@ RUBY_SPECIAL_SHIFT
Least significant 8 bits are reserved.
@ RUBY_FIXNUM_FLAG
Flag to denote a fixnum.
@ RUBY_Qnil
@ RUBY_FLONUM_MASK
Bit mask detecting a flonum.
@ RUBY_FLONUM_FLAG
Flag to denote a flonum.
@ RUBY_Qundef
Represents so-called undef.
@ RUBY_SYMBOL_FLAG
Flag to denote a static symbol.
@ RUBY_IMMEDIATE_MASK
Bit mask detecting special consts.
@ RUBY_Qfalse
static bool RB_NIL_P(VALUE obj)
Checks if the given object is nil.
static bool RB_FLONUM_P(VALUE obj)
Checks if the given object is a so-called Flonum.
static VALUE RB_ST2FIX(st_data_t i)
Converts a C's st_data_t into an instance of rb_cInteger.
Definition: st_data_t.h:59
#define _(args)
This was a transition path from K&R to ANSI.
Definition: stdarg.h:35
const VALUE ary[RARRAY_EMBED_LEN_MAX]
Embedded elements.
struct RBasic basic
Basic part, including flags and class.
const VALUE shared_root
Parent of the array.
long capa
Capacity of *ptr.
long len
Number of elements of the array.
const VALUE * ptr
Pointer to the C array that holds the elements of the array.
Ruby's object's, base components.
Definition: rbasic.h:64
const VALUE klass
Class of an object.
Definition: rbasic.h:88
VALUE flags
Per-object flags.
Definition: rbasic.h:77
RUBY_DATA_FUNC dfree
This function is called when the object is no longer used.
void * data
Pointer to the actual C level struct that you want to wrap.
RUBY_DATA_FUNC dmark
This function is called when the object is experiencing GC marks.
struct RBasic basic
Basic part, including flags and class.
Ruby's File and IO.
struct RBasic basic
Basic part, including flags and class.
struct rb_io_t * fptr
IO's specific fields.
Ruby's ordinal objects.
struct st_table * iv_index_tbl
This is a table that holds instance variable name to index mapping.
struct RBasic basic
Basic part, including flags and class.
VALUE * ivptr
Pointer to a C array that holds instance variables.
uint32_t numiv
Number of instance variables.
VALUE ary[ROBJECT_EMBED_LEN_MAX]
Embedded instance variables.
Ruby's regular expression.
struct RBasic basic
Basic part, including flags and class.
const VALUE src
Source code of this expression.
struct re_pattern_buffer * ptr
The pattern buffer.
unsigned long usecnt
Reference count.
Ruby's String.
struct RBasic basic
Basic part, including flags and class.
long capa
Capacity of *ptr.
long len
Length of the string, not including terminating NUL character.
VALUE shared
Parent of the string.
char * ptr
Pointer to the contents of the string.
"Typed" user data.
const rb_data_type_t * type
This field stores various information about how Ruby should handle a data.
VALUE typed_flag
This has to be always 1.
void * data
Pointer to the actual C level struct that you want to wrap.
struct RBasic basic
The part that all ruby objects have in common.
comment represents a sequence of comment lines.
Definition: parserstate.h:33
Definition: lex.c:34
Definition: lexer.h:99
Decomposed Enumerator::ArithmeicSequence.
CREF (Class REFerence)
This is the struct that holds necessary info for a struct.
size_t(* dsize)(const void *)
This function is to query the size of the underlying memory regions.
RUBY_DATA_FUNC dfree
This function is called when the object is no longer used.
void * data
Type-specific static data.
void * reserved[1]
This field is reserved for future extension.
RUBY_DATA_FUNC dcompact
This function is called when the object is relocated.
RUBY_DATA_FUNC dmark
This function is called when the object is experiencing GC marks.
const char * wrap_struct_name
Name of structs of this kind.
VALUE flags
Type-specific behavioural characteristics.
const rb_data_type_t * parent
Parent of this class.
The data structure which wraps the fd_set bitmap used by select(2).
Ruby's IO, metadata and buffers.
Definition: io.h:99
const rb_iseq_t *const iseqptr
iseq pointer, should be separated from iseqval
rb_cref_t *const cref
class reference, should be marked
Internal header for Class.
This is an implementation detail of rbimpl_size_mul_overflow().
size_t right
Multiplication result.
Definition: st.c:133
IFUNC (Internal FUNCtion)
SVAR (Special VARiable)
const VALUE cref_or_me
class reference or rb_method_entry_t
void rb_nativethread_lock_lock(rb_nativethread_lock_t *lock)
Blocks until the current thread obtains a lock.
Definition: thread.c:295
rb_nativethread_id_t rb_nativethread_self(void)
Queries the ID of the native thread that is calling this function.
void rb_nativethread_lock_unlock(rb_nativethread_lock_t *lock)
Releases a lock.
Definition: thread.c:301
void rb_nativethread_lock_initialize(rb_nativethread_lock_t *lock)
Fills the passed lock with an initial value.
Definition: thread.c:283
void rb_nativethread_lock_destroy(rb_nativethread_lock_t *lock)
Destroys the passed mutex.
Definition: thread.c:289
Definition: dtoa.c:302
uintptr_t ID
Type that represents a Ruby identifier such as a variable name.
Definition: value.h:52
uintptr_t VALUE
Type that represents a Ruby object.
Definition: value.h:40
static enum ruby_value_type rb_type(VALUE obj)
Identical to RB_BUILTIN_TYPE(), except it can also accept special constants.
Definition: value_type.h:224
static enum ruby_value_type RB_BUILTIN_TYPE(VALUE obj)
Queries the type of the object.
Definition: value_type.h:181
static bool RB_FLOAT_TYPE_P(VALUE obj)
Queries if the object is an instance of rb_cFloat.
Definition: value_type.h:263
static bool RB_SYMBOL_P(VALUE obj)
Queries if the object is an instance of rb_cSymbol.
Definition: value_type.h:306
static void Check_Type(VALUE v, enum ruby_value_type t)
Identical to RB_TYPE_P(), except it raises exceptions on predication failure.
Definition: value_type.h:432
static bool rb_integer_type_p(VALUE obj)
Queries if the object is an instance of rb_cInteger.
Definition: value_type.h:203
static bool RB_DYNAMIC_SYM_P(VALUE obj)
Queries if the object is a dynamic symbol.
Definition: value_type.h:286
static bool RB_TYPE_P(VALUE obj, enum ruby_value_type t)
Queries if the given object is of given type.
Definition: value_type.h:375
@ RUBY_T_SYMBOL
Definition: value_type.h:134
@ RUBY_T_MATCH
Definition: value_type.h:127
@ RUBY_T_MODULE
Definition: value_type.h:117
@ RUBY_T_ICLASS
Hidden classes known as IClasses.
Definition: value_type.h:140
@ RUBY_T_MOVED
Definition: value_type.h:142
@ RUBY_T_FIXNUM
Integers formerly known as Fixnums.
Definition: value_type.h:135
@ RUBY_T_IMEMO
Definition: value_type.h:138
@ RUBY_T_NODE
Definition: value_type.h:139
@ RUBY_T_OBJECT
Definition: value_type.h:115
@ RUBY_T_DATA
Definition: value_type.h:126
@ RUBY_T_FALSE
Definition: value_type.h:133
@ RUBY_T_UNDEF
Definition: value_type.h:136
@ RUBY_T_COMPLEX
Definition: value_type.h:128
@ RUBY_T_STRING
Definition: value_type.h:119
@ RUBY_T_HASH
Definition: value_type.h:122
@ RUBY_T_NIL
Definition: value_type.h:131
@ RUBY_T_CLASS
Definition: value_type.h:116
@ RUBY_T_ARRAY
Definition: value_type.h:121
@ RUBY_T_MASK
Bitmask of ruby_value_type.
Definition: value_type.h:144
@ RUBY_T_RATIONAL
Definition: value_type.h:129
@ RUBY_T_ZOMBIE
Definition: value_type.h:141
@ RUBY_T_BIGNUM
Definition: value_type.h:124
@ RUBY_T_TRUE
Definition: value_type.h:132
@ RUBY_T_FLOAT
Definition: value_type.h:118
@ RUBY_T_STRUCT
Definition: value_type.h:123
@ RUBY_T_NONE
Non-object (swept etc.)
Definition: value_type.h:113
@ RUBY_T_REGEXP
Definition: value_type.h:120
@ RUBY_T_FILE
Definition: value_type.h:125
void * ruby_xrealloc(void *ptr, size_t newsiz)
Resize the storage instance.
Definition: gc.c:14191
void * ruby_xrealloc2(void *ptr, size_t newelems, size_t newsiz)
Identical to ruby_xrealloc(), except it resizes the given storage instance to newelems * newsiz bytes...
Definition: gc.c:14201
void ruby_xfree(void *ptr)
Deallocates a storage instance.
Definition: gc.c:12226
void * ruby_xmalloc2(size_t nelems, size_t elemsiz)
Identical to ruby_xmalloc(), except it allocates nelems * elemsiz bytes.
Definition: gc.c:14171
void * ruby_xmalloc(size_t size)
Allocates a storage instance.
Definition: gc.c:14161
void * ruby_xcalloc(size_t nelems, size_t elemsiz)
Identical to ruby_xmalloc2(), except it returns a zero-filled storage instance.
Definition: gc.c:14181